mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-16 04:24:45 -07:00
Merge branch 'dev' of https://github.com/flipperdevices/flipperzero-firmware into dev
This commit is contained in:
@@ -56,7 +56,7 @@ static bool desktop_view_slideshow_input(InputEvent* event, void* context) {
|
|||||||
instance->callback(DesktopSlideshowCompleted, instance->context);
|
instance->callback(DesktopSlideshowCompleted, instance->context);
|
||||||
}
|
}
|
||||||
update_view = true;
|
update_view = true;
|
||||||
} else if(event->key == InputKeyOk) {
|
} else if(event->key == InputKeyOk && instance->timer) {
|
||||||
if(event->type == InputTypePress) {
|
if(event->type == InputTypePress) {
|
||||||
furi_timer_start(instance->timer, DESKTOP_SLIDESHOW_POWEROFF_SHORT);
|
furi_timer_start(instance->timer, DESKTOP_SLIDESHOW_POWEROFF_SHORT);
|
||||||
} else if(event->type == InputTypeRelease) {
|
} else if(event->type == InputTypeRelease) {
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ static bool char_is_lowercase(char letter) {
|
|||||||
static char char_to_uppercase(const char letter) {
|
static char char_to_uppercase(const char letter) {
|
||||||
if(letter == '_') {
|
if(letter == '_') {
|
||||||
return 0x20;
|
return 0x20;
|
||||||
} else if(isalpha(letter)) {
|
} else if(islower(letter)) {
|
||||||
return (letter - 0x20);
|
return (letter - 0x20);
|
||||||
} else {
|
} else {
|
||||||
return letter;
|
return letter;
|
||||||
@@ -309,7 +309,9 @@ static void text_input_handle_ok(TextInput* text_input, TextInputModel* model, b
|
|||||||
char selected = get_selected_char(model);
|
char selected = get_selected_char(model);
|
||||||
size_t text_length = strlen(model->text_buffer);
|
size_t text_length = strlen(model->text_buffer);
|
||||||
|
|
||||||
if(shift) {
|
bool toogle_case = text_length == 0;
|
||||||
|
if(shift) toogle_case = !toogle_case;
|
||||||
|
if(toogle_case) {
|
||||||
selected = char_to_uppercase(selected);
|
selected = char_to_uppercase(selected);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -329,9 +331,6 @@ static void text_input_handle_ok(TextInput* text_input, TextInputModel* model, b
|
|||||||
text_length = 0;
|
text_length = 0;
|
||||||
}
|
}
|
||||||
if(text_length < (model->text_buffer_size - 1)) {
|
if(text_length < (model->text_buffer_size - 1)) {
|
||||||
if(text_length == 0 && char_is_lowercase(selected)) {
|
|
||||||
selected = char_to_uppercase(selected);
|
|
||||||
}
|
|
||||||
model->text_buffer[text_length] = selected;
|
model->text_buffer[text_length] = selected;
|
||||||
model->text_buffer[text_length + 1] = 0;
|
model->text_buffer[text_length + 1] = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ STRING Flipper Zero BadUSB feature is compatible with USB Rubber Ducky script fo
|
|||||||
ENTER
|
ENTER
|
||||||
STRING More information about script syntax can be found here:
|
STRING More information about script syntax can be found here:
|
||||||
ENTER
|
ENTER
|
||||||
STRING https://github.com/hak5darren/USB-Rubber-Ducky/wiki/Duckyscript
|
STRING https://github.com/flipperdevices/flipperzero-firmware/blob/dev/documentation/file_formats/BadUsbScriptFormat.md
|
||||||
ENTER
|
ENTER
|
||||||
|
|
||||||
STRING EOF
|
STRING EOF
|
||||||
|
|||||||
@@ -80,5 +80,5 @@ STRING Flipper Zero BadUSB feature is compatible with USB Rubber Ducky script fo
|
|||||||
ENTER
|
ENTER
|
||||||
STRING More information about script syntax can be found here:
|
STRING More information about script syntax can be found here:
|
||||||
ENTER
|
ENTER
|
||||||
STRING https://github.com/hak5darren/USB-Rubber-Ducky/wiki/Duckyscript
|
STRING https://github.com/flipperdevices/flipperzero-firmware/blob/dev/documentation/file_formats/BadUsbScriptFormat.md
|
||||||
ENTER
|
ENTER
|
||||||
|
|||||||
Reference in New Issue
Block a user