Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
add direct shortcuts for live and pattern mode
- Loading branch information
Showing
with
17 additions
and
3 deletions.
-
+3
−1
docs/modes.md
-
+14
−2
module/main.c
|
|
@@ -10,14 +10,16 @@ These bindings work everywhere. |
|
|
| `<esc>` | preset read mode, or return to last mode | |
|
|
| `alt-<esc>` | preset write mode | |
|
|
| `win-<esc>` | clear delays, stack and slews | |
|
|
| `<print screen>` | help text, or return to last mode | |
|
|
| `<alt>-?` | help text, or return to last mode | |
|
|
| `<F1>` to `<F8>` | run corresponding script | |
|
|
| `<F9>` | run metro script | |
|
|
| `<F10>` | run init script | |
|
|
| `alt-<F1>` to `alt-<F8>` | edit corresponding script | |
|
|
| `alt-<F9>` | edit metro script | |
|
|
| `alt-<F10>` | edit init script | |
|
|
| `<numpad-1>` to `<numpad-8>` | run corresponding script | |
|
|
| `<num lock>` / `<F11>` | jump to pattern mode | |
|
|
| `<print screen>` / `<F12>` | jump to live mode | |
|
|
|
|
|
## Text editing |
|
|
|
|
|
|
|
|
@@ -511,8 +511,8 @@ bool process_global_keys(uint8_t k, uint8_t m, bool is_held_key) { |
|
|
} |
|
|
return true; |
|
|
} |
|
|
// <print screen>: help text, or return to last mode |
|
|
else if (match_no_mod(m, k, HID_PRINTSCREEN)) { |
|
|
// <alt>-?: help text, or return to last mode |
|
|
else if (match_shift_alt(m, k, HID_SLASH)) { |
|
|
if (mode == M_HELP) |
|
|
set_last_mode(); |
|
|
else { |
|
|
@@ -540,6 +540,18 @@ bool process_global_keys(uint8_t k, uint8_t m, bool is_held_key) { |
|
|
run_script(&scene_state, k - HID_KEYPAD_1); |
|
|
return true; |
|
|
} |
|
|
// <num lock>: jump to pattern mode |
|
|
else if (match_no_mod(m, k, HID_KEYPAD_NUM_LOCK) || |
|
|
match_no_mod(m, k, HID_F11)) { |
|
|
if (mode != M_PATTERN) { set_mode(M_PATTERN); } |
|
|
return true; |
|
|
} |
|
|
// <print screen>: jump to live mode |
|
|
else if (match_no_mod(m, k, HID_PRINTSCREEN) || |
|
|
match_no_mod(m, k, HID_F12)) { |
|
|
if (mode != M_LIVE) { set_mode(M_LIVE); } |
|
|
return true; |
|
|
} |
|
|
else { |
|
|
return false; |
|
|
} |
|
|
|