Normalise mouse keycodes (#23975)
This commit is contained in:
parent
bc0c69570b
commit
f8596b40a4
0
data/constants/keycodes/keycodes_0.0.5.hjson
Normal file
0
data/constants/keycodes/keycodes_0.0.5.hjson
Normal file
175
data/constants/keycodes/keycodes_0.0.5_basic.hjson
Normal file
175
data/constants/keycodes/keycodes_0.0.5_basic.hjson
Normal file
@ -0,0 +1,175 @@
|
||||
{
|
||||
"keycodes": {
|
||||
"0x00CD": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_CURSOR_UP",
|
||||
"label": "Mouse cursor up",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_UP"
|
||||
]
|
||||
},
|
||||
"0x00CE": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_CURSOR_DOWN",
|
||||
"label": "Mouse cursor down",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_DOWN"
|
||||
]
|
||||
},
|
||||
"0x00CF": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_CURSOR_LEFT",
|
||||
"label": "Mouse cursor left",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_LEFT"
|
||||
]
|
||||
},
|
||||
"0x00D0": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_CURSOR_RIGHT",
|
||||
"label": "Mouse cursor right",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_RGHT"
|
||||
]
|
||||
},
|
||||
"0x00D1": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_BUTTON_1",
|
||||
"label": "Mouse button 1",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_BTN1"
|
||||
]
|
||||
},
|
||||
"0x00D2": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_BUTTON_2",
|
||||
"label": "Mouse button 2",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_BTN2"
|
||||
]
|
||||
},
|
||||
"0x00D3": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_BUTTON_3",
|
||||
"label": "Mouse button 3",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_BTN3"
|
||||
]
|
||||
},
|
||||
"0x00D4": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_BUTTON_4",
|
||||
"label": "Mouse button 4",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_BTN4"
|
||||
]
|
||||
},
|
||||
"0x00D5": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_BUTTON_5",
|
||||
"label": "Mouse button 5",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_BTN5"
|
||||
]
|
||||
},
|
||||
"0x00D6": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_BUTTON_6",
|
||||
"label": "Mouse button 6",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_BTN6"
|
||||
]
|
||||
},
|
||||
"0x00D7": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_BUTTON_7",
|
||||
"label": "Mouse button 7",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_BTN7"
|
||||
]
|
||||
},
|
||||
"0x00D8": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_BUTTON_8",
|
||||
"label": "Mouse button 8",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_BTN8"
|
||||
]
|
||||
},
|
||||
"0x00D9": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_WHEEL_UP",
|
||||
"label": "Mouse wheel up",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_WHLU"
|
||||
]
|
||||
},
|
||||
"0x00DA": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_WHEEL_DOWN",
|
||||
"label": "Mouse wheel down",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_WHLD"
|
||||
]
|
||||
},
|
||||
"0x00DB": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_WHEEL_LEFT",
|
||||
"label": "Mouse wheel left",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_WHLL"
|
||||
]
|
||||
},
|
||||
"0x00DC": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_WHEEL_RIGHT",
|
||||
"label": "Mouse wheel right",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_WHLR"
|
||||
]
|
||||
},
|
||||
"0x00DD": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_ACCELERATION_0",
|
||||
"label": "Set mouse acceleration to 0",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_ACL0"
|
||||
]
|
||||
},
|
||||
"0x00DE": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_ACCELERATION_1",
|
||||
"label": "Set mouse acceleration to 1",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_ACL1"
|
||||
]
|
||||
},
|
||||
"0x00DF": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_ACCELERATION_2",
|
||||
"label": "Set mouse acceleration to 2",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_ACL2"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -84,10 +84,10 @@ Your `keymap.c` will then need an encoder mapping defined (for four layers and t
|
||||
```c
|
||||
#if defined(ENCODER_MAP_ENABLE)
|
||||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
|
||||
[0] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
|
||||
[1] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI), ENCODER_CCW_CW(RGB_SAD, RGB_SAI) },
|
||||
[2] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(RGB_SPD, RGB_SPI) },
|
||||
[3] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD), ENCODER_CCW_CW(KC_RIGHT, KC_LEFT) },
|
||||
[0] = { ENCODER_CCW_CW(MS_WHLU, MS_WHLD), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
|
||||
[1] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI), ENCODER_CCW_CW(RGB_SAD, RGB_SAI) },
|
||||
[2] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(RGB_SPD, RGB_SPI) },
|
||||
[3] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD), ENCODER_CCW_CW(KC_RIGHT, KC_LEFT) },
|
||||
};
|
||||
#endif
|
||||
```
|
||||
|
@ -18,27 +18,27 @@ MOUSEKEY_ENABLE = yes
|
||||
|
||||
In your keymap you can use the following keycodes to map key presses to mouse actions:
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|----------------|---------|-----------------|
|
||||
|`KC_MS_UP` |`KC_MS_U`|Move cursor up |
|
||||
|`KC_MS_DOWN` |`KC_MS_D`|Move cursor down |
|
||||
|`KC_MS_LEFT` |`KC_MS_L`|Move cursor left |
|
||||
|`KC_MS_RIGHT` |`KC_MS_R`|Move cursor right|
|
||||
|`KC_MS_BTN1` |`KC_BTN1`|Press button 1 |
|
||||
|`KC_MS_BTN2` |`KC_BTN2`|Press button 2 |
|
||||
|`KC_MS_BTN3` |`KC_BTN3`|Press button 3 |
|
||||
|`KC_MS_BTN4` |`KC_BTN4`|Press button 4 |
|
||||
|`KC_MS_BTN5` |`KC_BTN5`|Press button 5 |
|
||||
|`KC_MS_BTN6` |`KC_BTN6`|Press button 6 |
|
||||
|`KC_MS_BTN7` |`KC_BTN7`|Press button 7 |
|
||||
|`KC_MS_BTN8` |`KC_BTN8`|Press button 8 |
|
||||
|`KC_MS_WH_UP` |`KC_WH_U`|Move wheel up |
|
||||
|`KC_MS_WH_DOWN` |`KC_WH_D`|Move wheel down |
|
||||
|`KC_MS_WH_LEFT` |`KC_WH_L`|Move wheel left |
|
||||
|`KC_MS_WH_RIGHT`|`KC_WH_R`|Move wheel right |
|
||||
|`KC_MS_ACCEL0` |`KC_ACL0`|Set speed to 0 |
|
||||
|`KC_MS_ACCEL1` |`KC_ACL1`|Set speed to 1 |
|
||||
|`KC_MS_ACCEL2` |`KC_ACL2`|Set speed to 2 |
|
||||
|Key |Aliases |Description |
|
||||
|-------------------------|---------|---------------------------|
|
||||
|`QK_MOUSE_CURSOR_UP` |`MS_UP` |Mouse cursor up |
|
||||
|`QK_MOUSE_CURSOR_DOWN` |`MS_DOWN`|Mouse cursor down |
|
||||
|`QK_MOUSE_CURSOR_LEFT` |`MS_LEFT`|Mouse cursor left |
|
||||
|`QK_MOUSE_CURSOR_RIGHT` |`MS_RGHT`|Mouse cursor right |
|
||||
|`QK_MOUSE_BUTTON_1` |`MS_BTN1`|Mouse button 1 |
|
||||
|`QK_MOUSE_BUTTON_2` |`MS_BTN2`|Mouse button 2 |
|
||||
|`QK_MOUSE_BUTTON_3` |`MS_BTN3`|Mouse button 3 |
|
||||
|`QK_MOUSE_BUTTON_4` |`MS_BTN4`|Mouse button 4 |
|
||||
|`QK_MOUSE_BUTTON_5` |`MS_BTN5`|Mouse button 5 |
|
||||
|`QK_MOUSE_BUTTON_6` |`MS_BTN6`|Mouse button 6 |
|
||||
|`QK_MOUSE_BUTTON_7` |`MS_BTN7`|Mouse button 7 |
|
||||
|`QK_MOUSE_BUTTON_8` |`MS_BTN8`|Mouse button 8 |
|
||||
|`QK_MOUSE_WHEEL_UP` |`MS_WHLU`|Mouse wheel up |
|
||||
|`QK_MOUSE_WHEEL_DOWN` |`MS_WHLD`|Mouse wheel down |
|
||||
|`QK_MOUSE_WHEEL_LEFT` |`MS_WHLL`|Mouse wheel left |
|
||||
|`QK_MOUSE_WHEEL_RIGHT` |`MS_WHLR`|Mouse wheel right |
|
||||
|`QK_MOUSE_ACCELERATION_0`|`MS_ACL0`|Set mouse acceleration to 0|
|
||||
|`QK_MOUSE_ACCELERATION_1`|`MS_ACL1`|Set mouse acceleration to 1|
|
||||
|`QK_MOUSE_ACCELERATION_2`|`MS_ACL2`|Set mouse acceleration to 2|
|
||||
|
||||
## Configuring mouse keys
|
||||
|
||||
@ -106,17 +106,17 @@ Tips:
|
||||
|
||||
### Constant mode
|
||||
|
||||
In this mode you can define multiple different speeds for both the cursor and the mouse wheel. There is no acceleration. `KC_ACL0`, `KC_ACL1` and `KC_ACL2` change the cursor and scroll speed to their respective setting.
|
||||
In this mode you can define multiple different speeds for both the cursor and the mouse wheel. There is no acceleration. `MS_ACL0`, `MS_ACL1` and `MS_ACL2` change the cursor and scroll speed to their respective setting.
|
||||
|
||||
You can choose whether speed selection is momentary or tap-to-select:
|
||||
|
||||
* **Momentary:** The chosen speed is only active while you hold the respective key. When the key is raised, mouse keys returns to the unmodified speed.
|
||||
* **Tap-to-select:** The chosen speed is activated when you press the respective key and remains active even after the key has been raised. The default speed is that of `KC_ACL1`. There is no unmodified speed.
|
||||
* **Tap-to-select:** The chosen speed is activated when you press the respective key and remains active even after the key has been raised. The default speed is that of `MS_ACL1`. There is no unmodified speed.
|
||||
|
||||
The default speeds from slowest to fastest are as follows:
|
||||
|
||||
* **Momentary:** `KC_ACL0` < `KC_ACL1` < *unmodified* < `KC_ACL2`
|
||||
* **Tap-to-select:** `KC_ACL0` < `KC_ACL1` < `KC_ACL2`
|
||||
* **Momentary:** `MS_ACL0` < `MS_ACL1` < *unmodified* < `MS_ACL2`
|
||||
* **Tap-to-select:** `MS_ACL0` < `MS_ACL1` < `MS_ACL2`
|
||||
|
||||
To use constant speed mode, you must at least define `MK_3_SPEED` in your keymap’s `config.h` file:
|
||||
|
||||
@ -138,32 +138,32 @@ Use the following settings if you want to adjust cursor movement or scrolling:
|
||||
|`MK_MOMENTARY_ACCEL` |*Not defined*|Enable momentary speed selection |
|
||||
|`MK_C_OFFSET_UNMOD` |16 |Cursor offset per movement (unmodified) |
|
||||
|`MK_C_INTERVAL_UNMOD`|16 |Time between cursor movements (unmodified) |
|
||||
|`MK_C_OFFSET_0` |1 |Cursor offset per movement (`KC_ACL0`) |
|
||||
|`MK_C_INTERVAL_0` |32 |Time between cursor movements (`KC_ACL0`) |
|
||||
|`MK_C_OFFSET_1` |4 |Cursor offset per movement (`KC_ACL1`) |
|
||||
|`MK_C_INTERVAL_1` |16 |Time between cursor movements (`KC_ACL1`) |
|
||||
|`MK_C_OFFSET_2` |32 |Cursor offset per movement (`KC_ACL2`) |
|
||||
|`MK_C_INTERVAL_2` |16 |Time between cursor movements (`KC_ACL2`) |
|
||||
|`MK_C_OFFSET_0` |1 |Cursor offset per movement (`MS_ACL0`) |
|
||||
|`MK_C_INTERVAL_0` |32 |Time between cursor movements (`MS_ACL0`) |
|
||||
|`MK_C_OFFSET_1` |4 |Cursor offset per movement (`MS_ACL1`) |
|
||||
|`MK_C_INTERVAL_1` |16 |Time between cursor movements (`MS_ACL1`) |
|
||||
|`MK_C_OFFSET_2` |32 |Cursor offset per movement (`MS_ACL2`) |
|
||||
|`MK_C_INTERVAL_2` |16 |Time between cursor movements (`MS_ACL2`) |
|
||||
|`MK_W_OFFSET_UNMOD` |1 |Scroll steps per scroll action (unmodified)|
|
||||
|`MK_W_INTERVAL_UNMOD`|40 |Time between scroll steps (unmodified) |
|
||||
|`MK_W_OFFSET_0` |1 |Scroll steps per scroll action (`KC_ACL0`) |
|
||||
|`MK_W_INTERVAL_0` |360 |Time between scroll steps (`KC_ACL0`) |
|
||||
|`MK_W_OFFSET_1` |1 |Scroll steps per scroll action (`KC_ACL1`) |
|
||||
|`MK_W_INTERVAL_1` |120 |Time between scroll steps (`KC_ACL1`) |
|
||||
|`MK_W_OFFSET_2` |1 |Scroll steps per scroll action (`KC_ACL2`) |
|
||||
|`MK_W_INTERVAL_2` |20 |Time between scroll steps (`KC_ACL2`) |
|
||||
|`MK_W_OFFSET_0` |1 |Scroll steps per scroll action (`MS_ACL0`) |
|
||||
|`MK_W_INTERVAL_0` |360 |Time between scroll steps (`MS_ACL0`) |
|
||||
|`MK_W_OFFSET_1` |1 |Scroll steps per scroll action (`MS_ACL1`) |
|
||||
|`MK_W_INTERVAL_1` |120 |Time between scroll steps (`MS_ACL1`) |
|
||||
|`MK_W_OFFSET_2` |1 |Scroll steps per scroll action (`MS_ACL2`) |
|
||||
|`MK_W_INTERVAL_2` |20 |Time between scroll steps (`MS_ACL2`) |
|
||||
|
||||
### Combined mode
|
||||
|
||||
This mode functions like **Accelerated** mode, however, you can hold `KC_ACL0`, `KC_ACL1` and `KC_ACL2`
|
||||
This mode functions like **Accelerated** mode, however, you can hold `MS_ACL0`, `MS_ACL1` and `MS_ACL2`
|
||||
to momentarily (while held) set the cursor and scroll speeds to constant speeds. When no acceleration
|
||||
keys are held, this mode is identical to **Accelerated** mode, and can be modified using all of the
|
||||
relevant settings.
|
||||
|
||||
* **KC_ACL0:** This acceleration sets your cursor to the slowest possible speed. This is useful for very
|
||||
* **MS_ACL0:** This acceleration sets your cursor to the slowest possible speed. This is useful for very
|
||||
small and detailed movements of the cursor.
|
||||
* **KC_ACL1:** This acceleration sets your cursor to half the maximum (user defined) speed.
|
||||
* **KC_ACL2:** This acceleration sets your cursor to the maximum (computer defined) speed. This is
|
||||
* **MS_ACL1:** This acceleration sets your cursor to half the maximum (user defined) speed.
|
||||
* **MS_ACL2:** This acceleration sets your cursor to the maximum (computer defined) speed. This is
|
||||
useful for moving the cursor large distances without much accuracy.
|
||||
|
||||
To use combined speed mode, you must at least define `MK_COMBINED` in your keymap’s `config.h` file:
|
||||
|
@ -60,10 +60,10 @@ with mods, like Ctrl + Left ↔ Ctrl + Right Arrow.
|
||||
|`KC_UP` ↔ `KC_DOWN` | Up ↔ Down Arrow |
|
||||
|`KC_HOME` ↔ `KC_END` | Home ↔ End |
|
||||
|`KC_PGUP` ↔ `KC_PGDN` | Page Up ↔ Page Down |
|
||||
|`KC_MS_L` ↔ `KC_MS_R` | Mouse Cursor Left ↔ Right |
|
||||
|`KC_MS_U` ↔ `KC_MS_D` | Mouse Cursor Up ↔ Down |
|
||||
|`KC_WH_L` ↔ `KC_WH_R` | Mouse Wheel Left ↔ Right |
|
||||
|`KC_WH_U` ↔ `KC_WH_D` | Mouse Wheel Up ↔ Down |
|
||||
|`MS_LEFT` ↔ `MS_RGHT` | Mouse Cursor Left ↔ Right |
|
||||
|`MS_UP` ↔ `MS_DOWN` | Mouse Cursor Up ↔ Down |
|
||||
|`MS_WHLL` ↔ `MS_WHLR` | Mouse Wheel Left ↔ Right |
|
||||
|`MS_WHLU` ↔ `MS_WHLD` | Mouse Wheel Up ↔ Down |
|
||||
|
||||
**Misc**
|
||||
|
||||
|
@ -611,24 +611,27 @@ See also: [MIDI](features/midi)
|
||||
|
||||
See also: [Mouse Keys](features/mouse_keys)
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|----------------|---------|---------------------------|
|
||||
|`KC_MS_UP` |`KC_MS_U`|Mouse Cursor Up |
|
||||
|`KC_MS_DOWN` |`KC_MS_D`|Mouse Cursor Down |
|
||||
|`KC_MS_LEFT` |`KC_MS_L`|Mouse Cursor Left |
|
||||
|`KC_MS_RIGHT` |`KC_MS_R`|Mouse Cursor Right |
|
||||
|`KC_MS_BTN1` |`KC_BTN1`|Mouse Button 1 |
|
||||
|`KC_MS_BTN2` |`KC_BTN2`|Mouse Button 2 |
|
||||
|`KC_MS_BTN3` |`KC_BTN3`|Mouse Button 3 |
|
||||
|`KC_MS_BTN4` |`KC_BTN4`|Mouse Button 4 |
|
||||
|`KC_MS_BTN5` |`KC_BTN5`|Mouse Button 5 |
|
||||
|`KC_MS_WH_UP` |`KC_WH_U`|Mouse Wheel Up |
|
||||
|`KC_MS_WH_DOWN` |`KC_WH_D`|Mouse Wheel Down |
|
||||
|`KC_MS_WH_LEFT` |`KC_WH_L`|Mouse Wheel Left |
|
||||
|`KC_MS_WH_RIGHT`|`KC_WH_R`|Mouse Wheel Right |
|
||||
|`KC_MS_ACCEL0` |`KC_ACL0`|Set mouse acceleration to 0|
|
||||
|`KC_MS_ACCEL1` |`KC_ACL1`|Set mouse acceleration to 1|
|
||||
|`KC_MS_ACCEL2` |`KC_ACL2`|Set mouse acceleration to 2|
|
||||
|Key |Aliases |Description |
|
||||
|-------------------------|---------|---------------------------|
|
||||
|`QK_MOUSE_CURSOR_UP` |`MS_UP` |Mouse cursor up |
|
||||
|`QK_MOUSE_CURSOR_DOWN` |`MS_DOWN`|Mouse cursor down |
|
||||
|`QK_MOUSE_CURSOR_LEFT` |`MS_LEFT`|Mouse cursor left |
|
||||
|`QK_MOUSE_CURSOR_RIGHT` |`MS_RGHT`|Mouse cursor right |
|
||||
|`QK_MOUSE_BUTTON_1` |`MS_BTN1`|Mouse button 1 |
|
||||
|`QK_MOUSE_BUTTON_2` |`MS_BTN2`|Mouse button 2 |
|
||||
|`QK_MOUSE_BUTTON_3` |`MS_BTN3`|Mouse button 3 |
|
||||
|`QK_MOUSE_BUTTON_4` |`MS_BTN4`|Mouse button 4 |
|
||||
|`QK_MOUSE_BUTTON_5` |`MS_BTN5`|Mouse button 5 |
|
||||
|`QK_MOUSE_BUTTON_6` |`MS_BTN6`|Mouse button 6 |
|
||||
|`QK_MOUSE_BUTTON_7` |`MS_BTN7`|Mouse button 7 |
|
||||
|`QK_MOUSE_BUTTON_8` |`MS_BTN8`|Mouse button 8 |
|
||||
|`QK_MOUSE_WHEEL_UP` |`MS_WHLU`|Mouse wheel up |
|
||||
|`QK_MOUSE_WHEEL_DOWN` |`MS_WHLD`|Mouse wheel down |
|
||||
|`QK_MOUSE_WHEEL_LEFT` |`MS_WHLL`|Mouse wheel left |
|
||||
|`QK_MOUSE_WHEEL_RIGHT` |`MS_WHLR`|Mouse wheel right |
|
||||
|`QK_MOUSE_ACCELERATION_0`|`MS_ACL0`|Set mouse acceleration to 0|
|
||||
|`QK_MOUSE_ACCELERATION_1`|`MS_ACL1`|Set mouse acceleration to 1|
|
||||
|`QK_MOUSE_ACCELERATION_2`|`MS_ACL2`|Set mouse acceleration to 2|
|
||||
|
||||
## Modifiers {#modifiers}
|
||||
|
||||
|
@ -28,7 +28,7 @@ typedef struct {
|
||||
# ifndef CIRQUE_PINNACLE_TAPPING_TERM
|
||||
# include "action.h"
|
||||
# include "action_tapping.h"
|
||||
# define CIRQUE_PINNACLE_TAPPING_TERM GET_TAPPING_TERM(KC_BTN1, &(keyrecord_t){})
|
||||
# define CIRQUE_PINNACLE_TAPPING_TERM GET_TAPPING_TERM(QK_MOUSE_BUTTON_1, &(keyrecord_t){})
|
||||
# endif
|
||||
# ifndef CIRQUE_PINNACLE_TOUCH_DEBOUNCE
|
||||
# define CIRQUE_PINNACLE_TOUCH_DEBOUNCE (CIRQUE_PINNACLE_TAPPING_TERM * 8)
|
||||
|
@ -101,7 +101,7 @@ uint16_t handle_encoder_clockwise(void){
|
||||
mapped_code = KC_MEDIA_NEXT_TRACK;
|
||||
break;
|
||||
case ENC_MODE_SCROLL:
|
||||
mapped_code = KC_WH_D;
|
||||
mapped_code = QK_MOUSE_WHEEL_DOWN;
|
||||
break;
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
case ENC_MODE_BACKLIGHT:
|
||||
@ -143,7 +143,7 @@ uint16_t handle_encoder_ccw(void){
|
||||
mapped_code = KC_MEDIA_PREV_TRACK;
|
||||
break;
|
||||
case ENC_MODE_SCROLL:
|
||||
mapped_code = KC_WH_U;
|
||||
mapped_code = QK_MOUSE_WHEEL_UP;
|
||||
break;
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
case ENC_MODE_BACKLIGHT:
|
||||
@ -186,7 +186,7 @@ uint16_t handle_encoder_press(void){
|
||||
mapped_code = KC_MEDIA_PLAY_PAUSE;
|
||||
break;
|
||||
case ENC_MODE_SCROLL:
|
||||
mapped_code = KC_BTN3;
|
||||
mapped_code = QK_MOUSE_BUTTON_3;
|
||||
break;
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
case ENC_MODE_BACKLIGHT:
|
||||
|
@ -28,9 +28,9 @@ enum dichotomy_keycodes
|
||||
NUMKEY,
|
||||
SFTKEY,
|
||||
MOUKEY,
|
||||
MS_BTN1,
|
||||
MS_BTN2,
|
||||
MS_BTN3
|
||||
CK_MSE1,
|
||||
CK_MSE2,
|
||||
CK_MSE3
|
||||
};
|
||||
|
||||
#define CUSTOM_LONGPRESS 150
|
||||
@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
NUMKEY, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, CK_QE,
|
||||
SFTKEY, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MOUKEY,
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_RGUI, KC_RALT, KC_RCTL,
|
||||
MS_BTN3, KC_LBRC, KC_LPRN, KC_SPC, KC_SPC, KC_RPRN, KC_RBRC, MS_BTN3
|
||||
CK_MSE3, KC_LBRC, KC_LPRN, KC_SPC, KC_SPC, KC_RPRN, KC_RBRC, CK_MSE3
|
||||
),
|
||||
|
||||
[_SF] = LAYOUT( /* Shifted layout, small changes (because angle brackets have been moved to thumb cluster buttons) */
|
||||
@ -75,7 +75,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_MS] = LAYOUT( /* Mouse layer, including buttons for clicking. */
|
||||
_______, _______, _______, _______, _______, _______, KC_VOLU, KC_HOME, KC_PGUP, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, MS_BTN1, MS_BTN2, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, CK_MSE1, CK_MSE2, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, KC_VOLD, KC_END, KC_PGDN, _______, _______, _______,
|
||||
_______, _______, _______, _______, KC_UP, _______,
|
||||
_______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______
|
||||
@ -311,7 +311,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
break;
|
||||
|
||||
//mouse buttons, for 1-3, to update the mouse report:
|
||||
case MS_BTN1:
|
||||
case CK_MSE1:
|
||||
currentReport = pointing_device_get_report();
|
||||
if (record->event.pressed) {
|
||||
if (shift_held && shift_suspended){
|
||||
@ -327,7 +327,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
pointing_device_set_report(currentReport);
|
||||
returnVal = false;
|
||||
break;
|
||||
case MS_BTN2:
|
||||
case CK_MSE2:
|
||||
currentReport = pointing_device_get_report();
|
||||
if (record->event.pressed) {
|
||||
if (shift_held && shift_suspended){
|
||||
@ -343,7 +343,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
pointing_device_set_report(currentReport);
|
||||
returnVal = false;
|
||||
break;
|
||||
case MS_BTN3:
|
||||
case CK_MSE3:
|
||||
currentReport = pointing_device_get_report();
|
||||
if (record->event.pressed) {
|
||||
if (shift_held && shift_suspended){
|
||||
|
@ -329,7 +329,7 @@ void register_mouse(uint8_t mouse_keycode, bool pressed) {
|
||||
// should mousekeys send report, or does something else handle this?
|
||||
switch (mouse_keycode) {
|
||||
# if defined(PS2_MOUSE_ENABLE) || defined(POINTING_DEVICE_ENABLE)
|
||||
case KC_MS_BTN1 ... KC_MS_BTN8:
|
||||
case QK_MOUSE_BUTTON_1 ... QK_MOUSE_BUTTON_8:
|
||||
// let pointing device handle the buttons
|
||||
// expand if/when it handles more of the code
|
||||
# if defined(POINTING_DEVICE_ENABLE)
|
||||
@ -351,8 +351,8 @@ void register_mouse(uint8_t mouse_keycode, bool pressed) {
|
||||
|
||||
#ifdef PS2_MOUSE_ENABLE
|
||||
// make sure that ps2 mouse has button report synced
|
||||
if (KC_MS_BTN1 <= mouse_keycode && mouse_keycode <= KC_MS_BTN3) {
|
||||
uint8_t tmp_button_msk = MOUSE_BTN_MASK(mouse_keycode - KC_MS_BTN1);
|
||||
if (QK_MOUSE_BUTTON_1 <= mouse_keycode && mouse_keycode <= QK_MOUSE_BUTTON_3) {
|
||||
uint8_t tmp_button_msk = MOUSE_BTN_MASK(mouse_keycode - QK_MOUSE_BUTTON_1);
|
||||
tp_buttons = pressed ? tp_buttons | tmp_button_msk : tp_buttons & ~tmp_button_msk;
|
||||
}
|
||||
#endif
|
||||
|
@ -160,7 +160,7 @@ __attribute__((weak)) bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
# if defined(EXTRAKEY_ENABLE)
|
||||
tap_code_delay(KC_VOLU, 10);
|
||||
# elif defined(MOUSEKEY_ENABLE)
|
||||
tap_code_delay(KC_MS_WH_UP, 10);
|
||||
tap_code_delay(QK_MOUSE_WHEEL_UP, 10);
|
||||
# else
|
||||
tap_code_delay(KC_PGDN, 10);
|
||||
# endif
|
||||
@ -168,7 +168,7 @@ __attribute__((weak)) bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
# if defined(EXTRAKEY_ENABLE)
|
||||
tap_code_delay(KC_VOLD, 10);
|
||||
# elif defined(MOUSEKEY_ENABLE)
|
||||
tap_code_delay(KC_MS_WH_DOWN, 10);
|
||||
tap_code_delay(QK_MOUSE_WHEEL_DOWN, 10);
|
||||
# else
|
||||
tap_code_delay(KC_PGUP, 10);
|
||||
# endif
|
||||
|
@ -29,10 +29,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define IS_ANY(code) (KC_A <= (code) && (code) <= 0xFF)
|
||||
|
||||
#define IS_MOUSEKEY(code) IS_MOUSE_KEYCODE(code)
|
||||
#define IS_MOUSEKEY_MOVE(code) (KC_MS_UP <= (code) && (code) <= KC_MS_RIGHT)
|
||||
#define IS_MOUSEKEY_BUTTON(code) (KC_MS_BTN1 <= (code) && (code) <= KC_MS_BTN8)
|
||||
#define IS_MOUSEKEY_WHEEL(code) (KC_MS_WH_UP <= (code) && (code) <= KC_MS_WH_RIGHT)
|
||||
#define IS_MOUSEKEY_ACCEL(code) (KC_MS_ACCEL0 <= (code) && (code) <= KC_MS_ACCEL2)
|
||||
#define IS_MOUSEKEY_MOVE(code) (QK_MOUSE_CURSOR_UP <= (code) && (code) <= QK_MOUSE_CURSOR_RIGHT)
|
||||
#define IS_MOUSEKEY_BUTTON(code) (QK_MOUSE_BUTTON_1 <= (code) && (code) <= QK_MOUSE_BUTTON_8)
|
||||
#define IS_MOUSEKEY_WHEEL(code) (QK_MOUSE_WHEEL_UP <= (code) && (code) <= QK_MOUSE_WHEEL_RIGHT)
|
||||
#define IS_MOUSEKEY_ACCEL(code) (QK_MOUSE_ACCELERATION_0 <= (code) && (code) <= QK_MOUSE_ACCELERATION_2)
|
||||
|
||||
#define MOD_BIT(code) (1 << ((code)&0x07))
|
||||
|
||||
|
@ -283,25 +283,25 @@ enum qk_keycode_defines {
|
||||
KC_ASSISTANT = 0x00C0,
|
||||
KC_MISSION_CONTROL = 0x00C1,
|
||||
KC_LAUNCHPAD = 0x00C2,
|
||||
KC_MS_UP = 0x00CD,
|
||||
KC_MS_DOWN = 0x00CE,
|
||||
KC_MS_LEFT = 0x00CF,
|
||||
KC_MS_RIGHT = 0x00D0,
|
||||
KC_MS_BTN1 = 0x00D1,
|
||||
KC_MS_BTN2 = 0x00D2,
|
||||
KC_MS_BTN3 = 0x00D3,
|
||||
KC_MS_BTN4 = 0x00D4,
|
||||
KC_MS_BTN5 = 0x00D5,
|
||||
KC_MS_BTN6 = 0x00D6,
|
||||
KC_MS_BTN7 = 0x00D7,
|
||||
KC_MS_BTN8 = 0x00D8,
|
||||
KC_MS_WH_UP = 0x00D9,
|
||||
KC_MS_WH_DOWN = 0x00DA,
|
||||
KC_MS_WH_LEFT = 0x00DB,
|
||||
KC_MS_WH_RIGHT = 0x00DC,
|
||||
KC_MS_ACCEL0 = 0x00DD,
|
||||
KC_MS_ACCEL1 = 0x00DE,
|
||||
KC_MS_ACCEL2 = 0x00DF,
|
||||
QK_MOUSE_CURSOR_UP = 0x00CD,
|
||||
QK_MOUSE_CURSOR_DOWN = 0x00CE,
|
||||
QK_MOUSE_CURSOR_LEFT = 0x00CF,
|
||||
QK_MOUSE_CURSOR_RIGHT = 0x00D0,
|
||||
QK_MOUSE_BUTTON_1 = 0x00D1,
|
||||
QK_MOUSE_BUTTON_2 = 0x00D2,
|
||||
QK_MOUSE_BUTTON_3 = 0x00D3,
|
||||
QK_MOUSE_BUTTON_4 = 0x00D4,
|
||||
QK_MOUSE_BUTTON_5 = 0x00D5,
|
||||
QK_MOUSE_BUTTON_6 = 0x00D6,
|
||||
QK_MOUSE_BUTTON_7 = 0x00D7,
|
||||
QK_MOUSE_BUTTON_8 = 0x00D8,
|
||||
QK_MOUSE_WHEEL_UP = 0x00D9,
|
||||
QK_MOUSE_WHEEL_DOWN = 0x00DA,
|
||||
QK_MOUSE_WHEEL_LEFT = 0x00DB,
|
||||
QK_MOUSE_WHEEL_RIGHT = 0x00DC,
|
||||
QK_MOUSE_ACCELERATION_0 = 0x00DD,
|
||||
QK_MOUSE_ACCELERATION_1 = 0x00DE,
|
||||
QK_MOUSE_ACCELERATION_2 = 0x00DF,
|
||||
KC_LEFT_CTRL = 0x00E0,
|
||||
KC_LEFT_SHIFT = 0x00E1,
|
||||
KC_LEFT_ALT = 0x00E2,
|
||||
@ -926,25 +926,25 @@ enum qk_keycode_defines {
|
||||
KC_ASST = KC_ASSISTANT,
|
||||
KC_MCTL = KC_MISSION_CONTROL,
|
||||
KC_LPAD = KC_LAUNCHPAD,
|
||||
KC_MS_U = KC_MS_UP,
|
||||
KC_MS_D = KC_MS_DOWN,
|
||||
KC_MS_L = KC_MS_LEFT,
|
||||
KC_MS_R = KC_MS_RIGHT,
|
||||
KC_BTN1 = KC_MS_BTN1,
|
||||
KC_BTN2 = KC_MS_BTN2,
|
||||
KC_BTN3 = KC_MS_BTN3,
|
||||
KC_BTN4 = KC_MS_BTN4,
|
||||
KC_BTN5 = KC_MS_BTN5,
|
||||
KC_BTN6 = KC_MS_BTN6,
|
||||
KC_BTN7 = KC_MS_BTN7,
|
||||
KC_BTN8 = KC_MS_BTN8,
|
||||
KC_WH_U = KC_MS_WH_UP,
|
||||
KC_WH_D = KC_MS_WH_DOWN,
|
||||
KC_WH_L = KC_MS_WH_LEFT,
|
||||
KC_WH_R = KC_MS_WH_RIGHT,
|
||||
KC_ACL0 = KC_MS_ACCEL0,
|
||||
KC_ACL1 = KC_MS_ACCEL1,
|
||||
KC_ACL2 = KC_MS_ACCEL2,
|
||||
MS_UP = QK_MOUSE_CURSOR_UP,
|
||||
MS_DOWN = QK_MOUSE_CURSOR_DOWN,
|
||||
MS_LEFT = QK_MOUSE_CURSOR_LEFT,
|
||||
MS_RGHT = QK_MOUSE_CURSOR_RIGHT,
|
||||
MS_BTN1 = QK_MOUSE_BUTTON_1,
|
||||
MS_BTN2 = QK_MOUSE_BUTTON_2,
|
||||
MS_BTN3 = QK_MOUSE_BUTTON_3,
|
||||
MS_BTN4 = QK_MOUSE_BUTTON_4,
|
||||
MS_BTN5 = QK_MOUSE_BUTTON_5,
|
||||
MS_BTN6 = QK_MOUSE_BUTTON_6,
|
||||
MS_BTN7 = QK_MOUSE_BUTTON_7,
|
||||
MS_BTN8 = QK_MOUSE_BUTTON_8,
|
||||
MS_WHLU = QK_MOUSE_WHEEL_UP,
|
||||
MS_WHLD = QK_MOUSE_WHEEL_DOWN,
|
||||
MS_WHLL = QK_MOUSE_WHEEL_LEFT,
|
||||
MS_WHLR = QK_MOUSE_WHEEL_RIGHT,
|
||||
MS_ACL0 = QK_MOUSE_ACCELERATION_0,
|
||||
MS_ACL1 = QK_MOUSE_ACCELERATION_1,
|
||||
MS_ACL2 = QK_MOUSE_ACCELERATION_2,
|
||||
KC_LCTL = KC_LEFT_CTRL,
|
||||
KC_LSFT = KC_LEFT_SHIFT,
|
||||
KC_LALT = KC_LEFT_ALT,
|
||||
@ -1457,7 +1457,7 @@ enum qk_keycode_defines {
|
||||
#define IS_BASIC_KEYCODE(code) ((code) >= KC_A && (code) <= KC_EXSEL)
|
||||
#define IS_SYSTEM_KEYCODE(code) ((code) >= KC_SYSTEM_POWER && (code) <= KC_SYSTEM_WAKE)
|
||||
#define IS_CONSUMER_KEYCODE(code) ((code) >= KC_AUDIO_MUTE && (code) <= KC_LAUNCHPAD)
|
||||
#define IS_MOUSE_KEYCODE(code) ((code) >= KC_MS_UP && (code) <= KC_MS_ACCEL2)
|
||||
#define IS_MOUSE_KEYCODE(code) ((code) >= QK_MOUSE_CURSOR_UP && (code) <= QK_MOUSE_ACCELERATION_2)
|
||||
#define IS_MODIFIER_KEYCODE(code) ((code) >= KC_LEFT_CTRL && (code) <= KC_RIGHT_GUI)
|
||||
#define IS_SWAP_HANDS_KEYCODE(code) ((code) >= QK_SWAP_HANDS_TOGGLE && (code) <= QK_SWAP_HANDS_ONE_SHOT)
|
||||
#define IS_MAGIC_KEYCODE(code) ((code) >= QK_MAGIC_SWAP_CONTROL_CAPS_LOCK && (code) <= QK_MAGIC_TOGGLE_ESCAPE_CAPS_LOCK)
|
||||
@ -1482,7 +1482,7 @@ enum qk_keycode_defines {
|
||||
#define BASIC_KEYCODE_RANGE KC_A ... KC_EXSEL
|
||||
#define SYSTEM_KEYCODE_RANGE KC_SYSTEM_POWER ... KC_SYSTEM_WAKE
|
||||
#define CONSUMER_KEYCODE_RANGE KC_AUDIO_MUTE ... KC_LAUNCHPAD
|
||||
#define MOUSE_KEYCODE_RANGE KC_MS_UP ... KC_MS_ACCEL2
|
||||
#define MOUSE_KEYCODE_RANGE QK_MOUSE_CURSOR_UP ... QK_MOUSE_ACCELERATION_2
|
||||
#define MODIFIER_KEYCODE_RANGE KC_LEFT_CTRL ... KC_RIGHT_GUI
|
||||
#define SWAP_HANDS_KEYCODE_RANGE QK_SWAP_HANDS_TOGGLE ... QK_SWAP_HANDS_ONE_SHOT
|
||||
#define MAGIC_KEYCODE_RANGE QK_MAGIC_SWAP_CONTROL_CAPS_LOCK ... QK_MAGIC_TOGGLE_ESCAPE_CAPS_LOCK
|
||||
|
@ -407,42 +407,42 @@ void mousekey_on(uint8_t code) {
|
||||
# ifdef MOUSEKEY_INERTIA
|
||||
|
||||
// initial keypress sets impulse and activates first frame of movement
|
||||
if ((code == KC_MS_UP) || (code == KC_MS_DOWN)) {
|
||||
mousekey_y_dir = (code == KC_MS_DOWN) ? 1 : -1;
|
||||
if ((code == QK_MOUSE_CURSOR_UP) || (code == QK_MOUSE_CURSOR_DOWN)) {
|
||||
mousekey_y_dir = (code == QK_MOUSE_CURSOR_DOWN) ? 1 : -1;
|
||||
if (mousekey_frame < 2) mouse_report.y = move_unit(1);
|
||||
} else if ((code == KC_MS_LEFT) || (code == KC_MS_RIGHT)) {
|
||||
mousekey_x_dir = (code == KC_MS_RIGHT) ? 1 : -1;
|
||||
} else if ((code == QK_MOUSE_CURSOR_LEFT) || (code == QK_MOUSE_CURSOR_RIGHT)) {
|
||||
mousekey_x_dir = (code == QK_MOUSE_CURSOR_RIGHT) ? 1 : -1;
|
||||
if (mousekey_frame < 2) mouse_report.x = move_unit(0);
|
||||
}
|
||||
|
||||
# else // no inertia
|
||||
|
||||
if (code == KC_MS_UP)
|
||||
if (code == QK_MOUSE_CURSOR_UP)
|
||||
mouse_report.y = move_unit() * -1;
|
||||
else if (code == KC_MS_DOWN)
|
||||
else if (code == QK_MOUSE_CURSOR_DOWN)
|
||||
mouse_report.y = move_unit();
|
||||
else if (code == KC_MS_LEFT)
|
||||
else if (code == QK_MOUSE_CURSOR_LEFT)
|
||||
mouse_report.x = move_unit() * -1;
|
||||
else if (code == KC_MS_RIGHT)
|
||||
else if (code == QK_MOUSE_CURSOR_RIGHT)
|
||||
mouse_report.x = move_unit();
|
||||
|
||||
# endif // inertia or not
|
||||
|
||||
else if (code == KC_MS_WH_UP)
|
||||
else if (code == QK_MOUSE_WHEEL_UP)
|
||||
mouse_report.v = wheel_unit();
|
||||
else if (code == KC_MS_WH_DOWN)
|
||||
else if (code == QK_MOUSE_WHEEL_DOWN)
|
||||
mouse_report.v = wheel_unit() * -1;
|
||||
else if (code == KC_MS_WH_LEFT)
|
||||
else if (code == QK_MOUSE_WHEEL_LEFT)
|
||||
mouse_report.h = wheel_unit() * -1;
|
||||
else if (code == KC_MS_WH_RIGHT)
|
||||
else if (code == QK_MOUSE_WHEEL_RIGHT)
|
||||
mouse_report.h = wheel_unit();
|
||||
else if (IS_MOUSEKEY_BUTTON(code))
|
||||
mouse_report.buttons |= 1 << (code - KC_MS_BTN1);
|
||||
else if (code == KC_MS_ACCEL0)
|
||||
mouse_report.buttons |= 1 << (code - QK_MOUSE_BUTTON_1);
|
||||
else if (code == QK_MOUSE_ACCELERATION_0)
|
||||
mousekey_accel |= (1 << 0);
|
||||
else if (code == KC_MS_ACCEL1)
|
||||
else if (code == QK_MOUSE_ACCELERATION_1)
|
||||
mousekey_accel |= (1 << 1);
|
||||
else if (code == KC_MS_ACCEL2)
|
||||
else if (code == QK_MOUSE_ACCELERATION_2)
|
||||
mousekey_accel |= (1 << 2);
|
||||
}
|
||||
|
||||
@ -450,43 +450,43 @@ void mousekey_off(uint8_t code) {
|
||||
# ifdef MOUSEKEY_INERTIA
|
||||
|
||||
// key release clears impulse unless opposite direction is held
|
||||
if ((code == KC_MS_UP) && (mousekey_y_dir < 1))
|
||||
if ((code == QK_MOUSE_CURSOR_UP) && (mousekey_y_dir < 1))
|
||||
mousekey_y_dir = 0;
|
||||
else if ((code == KC_MS_DOWN) && (mousekey_y_dir > -1))
|
||||
else if ((code == QK_MOUSE_CURSOR_DOWN) && (mousekey_y_dir > -1))
|
||||
mousekey_y_dir = 0;
|
||||
else if ((code == KC_MS_LEFT) && (mousekey_x_dir < 1))
|
||||
else if ((code == QK_MOUSE_CURSOR_LEFT) && (mousekey_x_dir < 1))
|
||||
mousekey_x_dir = 0;
|
||||
else if ((code == KC_MS_RIGHT) && (mousekey_x_dir > -1))
|
||||
else if ((code == QK_MOUSE_CURSOR_RIGHT) && (mousekey_x_dir > -1))
|
||||
mousekey_x_dir = 0;
|
||||
|
||||
# else // no inertia
|
||||
|
||||
if (code == KC_MS_UP && mouse_report.y < 0)
|
||||
if (code == QK_MOUSE_CURSOR_UP && mouse_report.y < 0)
|
||||
mouse_report.y = 0;
|
||||
else if (code == KC_MS_DOWN && mouse_report.y > 0)
|
||||
else if (code == QK_MOUSE_CURSOR_DOWN && mouse_report.y > 0)
|
||||
mouse_report.y = 0;
|
||||
else if (code == KC_MS_LEFT && mouse_report.x < 0)
|
||||
else if (code == QK_MOUSE_CURSOR_LEFT && mouse_report.x < 0)
|
||||
mouse_report.x = 0;
|
||||
else if (code == KC_MS_RIGHT && mouse_report.x > 0)
|
||||
else if (code == QK_MOUSE_CURSOR_RIGHT && mouse_report.x > 0)
|
||||
mouse_report.x = 0;
|
||||
|
||||
# endif // inertia or not
|
||||
|
||||
else if (code == KC_MS_WH_UP && mouse_report.v > 0)
|
||||
else if (code == QK_MOUSE_WHEEL_UP && mouse_report.v > 0)
|
||||
mouse_report.v = 0;
|
||||
else if (code == KC_MS_WH_DOWN && mouse_report.v < 0)
|
||||
else if (code == QK_MOUSE_WHEEL_DOWN && mouse_report.v < 0)
|
||||
mouse_report.v = 0;
|
||||
else if (code == KC_MS_WH_LEFT && mouse_report.h < 0)
|
||||
else if (code == QK_MOUSE_WHEEL_LEFT && mouse_report.h < 0)
|
||||
mouse_report.h = 0;
|
||||
else if (code == KC_MS_WH_RIGHT && mouse_report.h > 0)
|
||||
else if (code == QK_MOUSE_WHEEL_RIGHT && mouse_report.h > 0)
|
||||
mouse_report.h = 0;
|
||||
else if (IS_MOUSEKEY_BUTTON(code))
|
||||
mouse_report.buttons &= ~(1 << (code - KC_MS_BTN1));
|
||||
else if (code == KC_MS_ACCEL0)
|
||||
mouse_report.buttons &= ~(1 << (code - QK_MOUSE_BUTTON_1));
|
||||
else if (code == QK_MOUSE_ACCELERATION_0)
|
||||
mousekey_accel &= ~(1 << 0);
|
||||
else if (code == KC_MS_ACCEL1)
|
||||
else if (code == QK_MOUSE_ACCELERATION_1)
|
||||
mousekey_accel &= ~(1 << 1);
|
||||
else if (code == KC_MS_ACCEL2)
|
||||
else if (code == QK_MOUSE_ACCELERATION_2)
|
||||
mousekey_accel &= ~(1 << 2);
|
||||
if (mouse_report.x == 0 && mouse_report.y == 0) {
|
||||
mousekey_repeat = 0;
|
||||
@ -568,29 +568,29 @@ void mousekey_on(uint8_t code) {
|
||||
uint16_t const c_offset = c_offsets[mk_speed];
|
||||
uint16_t const w_offset = w_offsets[mk_speed];
|
||||
uint8_t const old_speed = mk_speed;
|
||||
if (code == KC_MS_UP)
|
||||
if (code == QK_MOUSE_CURSOR_UP)
|
||||
mouse_report.y = c_offset * -1;
|
||||
else if (code == KC_MS_DOWN)
|
||||
else if (code == QK_MOUSE_CURSOR_DOWN)
|
||||
mouse_report.y = c_offset;
|
||||
else if (code == KC_MS_LEFT)
|
||||
else if (code == QK_MOUSE_CURSOR_LEFT)
|
||||
mouse_report.x = c_offset * -1;
|
||||
else if (code == KC_MS_RIGHT)
|
||||
else if (code == QK_MOUSE_CURSOR_RIGHT)
|
||||
mouse_report.x = c_offset;
|
||||
else if (code == KC_MS_WH_UP)
|
||||
else if (code == QK_MOUSE_WHEEL_UP)
|
||||
mouse_report.v = w_offset;
|
||||
else if (code == KC_MS_WH_DOWN)
|
||||
else if (code == QK_MOUSE_WHEEL_DOWN)
|
||||
mouse_report.v = w_offset * -1;
|
||||
else if (code == KC_MS_WH_LEFT)
|
||||
else if (code == QK_MOUSE_WHEEL_LEFT)
|
||||
mouse_report.h = w_offset * -1;
|
||||
else if (code == KC_MS_WH_RIGHT)
|
||||
else if (code == QK_MOUSE_WHEEL_RIGHT)
|
||||
mouse_report.h = w_offset;
|
||||
else if (IS_MOUSEKEY_BUTTON(code))
|
||||
mouse_report.buttons |= 1 << (code - KC_MS_BTN1);
|
||||
else if (code == KC_MS_ACCEL0)
|
||||
mouse_report.buttons |= 1 << (code - QK_MOUSE_BUTTON_1);
|
||||
else if (code == QK_MOUSE_ACCELERATION_0)
|
||||
mk_speed = mkspd_0;
|
||||
else if (code == KC_MS_ACCEL1)
|
||||
else if (code == QK_MOUSE_ACCELERATION_1)
|
||||
mk_speed = mkspd_1;
|
||||
else if (code == KC_MS_ACCEL2)
|
||||
else if (code == QK_MOUSE_ACCELERATION_2)
|
||||
mk_speed = mkspd_2;
|
||||
if (mk_speed != old_speed) adjust_speed();
|
||||
}
|
||||
@ -599,30 +599,30 @@ void mousekey_off(uint8_t code) {
|
||||
# ifdef MK_MOMENTARY_ACCEL
|
||||
uint8_t const old_speed = mk_speed;
|
||||
# endif
|
||||
if (code == KC_MS_UP && mouse_report.y < 0)
|
||||
if (code == QK_MOUSE_CURSOR_UP && mouse_report.y < 0)
|
||||
mouse_report.y = 0;
|
||||
else if (code == KC_MS_DOWN && mouse_report.y > 0)
|
||||
else if (code == QK_MOUSE_CURSOR_DOWN && mouse_report.y > 0)
|
||||
mouse_report.y = 0;
|
||||
else if (code == KC_MS_LEFT && mouse_report.x < 0)
|
||||
else if (code == QK_MOUSE_CURSOR_LEFT && mouse_report.x < 0)
|
||||
mouse_report.x = 0;
|
||||
else if (code == KC_MS_RIGHT && mouse_report.x > 0)
|
||||
else if (code == QK_MOUSE_CURSOR_RIGHT && mouse_report.x > 0)
|
||||
mouse_report.x = 0;
|
||||
else if (code == KC_MS_WH_UP && mouse_report.v > 0)
|
||||
else if (code == QK_MOUSE_WHEEL_UP && mouse_report.v > 0)
|
||||
mouse_report.v = 0;
|
||||
else if (code == KC_MS_WH_DOWN && mouse_report.v < 0)
|
||||
else if (code == QK_MOUSE_WHEEL_DOWN && mouse_report.v < 0)
|
||||
mouse_report.v = 0;
|
||||
else if (code == KC_MS_WH_LEFT && mouse_report.h < 0)
|
||||
else if (code == QK_MOUSE_WHEEL_LEFT && mouse_report.h < 0)
|
||||
mouse_report.h = 0;
|
||||
else if (code == KC_MS_WH_RIGHT && mouse_report.h > 0)
|
||||
else if (code == QK_MOUSE_WHEEL_RIGHT && mouse_report.h > 0)
|
||||
mouse_report.h = 0;
|
||||
else if (IS_MOUSEKEY_BUTTON(code))
|
||||
mouse_report.buttons &= ~(1 << (code - KC_MS_BTN1));
|
||||
mouse_report.buttons &= ~(1 << (code - QK_MOUSE_BUTTON_1));
|
||||
# ifdef MK_MOMENTARY_ACCEL
|
||||
else if (code == KC_MS_ACCEL0)
|
||||
else if (code == QK_MOUSE_ACCELERATION_0)
|
||||
mk_speed = mkspd_DEFAULT;
|
||||
else if (code == KC_MS_ACCEL1)
|
||||
else if (code == QK_MOUSE_ACCELERATION_1)
|
||||
mk_speed = mkspd_DEFAULT;
|
||||
else if (code == KC_MS_ACCEL2)
|
||||
else if (code == QK_MOUSE_ACCELERATION_2)
|
||||
mk_speed = mkspd_DEFAULT;
|
||||
if (mk_speed != old_speed) adjust_speed();
|
||||
# endif
|
||||
|
@ -498,7 +498,7 @@ __attribute__((weak)) report_mouse_t pointing_device_task_combined_user(report_m
|
||||
|
||||
__attribute__((weak)) void pointing_device_keycode_handler(uint16_t keycode, bool pressed) {
|
||||
if IS_MOUSEKEY_BUTTON (keycode) {
|
||||
local_mouse_report.buttons = pointing_device_handle_buttons(local_mouse_report.buttons, pressed, keycode - KC_MS_BTN1);
|
||||
local_mouse_report.buttons = pointing_device_handle_buttons(local_mouse_report.buttons, pressed, keycode - QK_MOUSE_BUTTON_1);
|
||||
pointing_device_send();
|
||||
}
|
||||
}
|
||||
|
@ -37,7 +37,7 @@
|
||||
# define AUTO_MOUSE_TIME 650
|
||||
#endif
|
||||
#ifndef AUTO_MOUSE_DELAY
|
||||
# define AUTO_MOUSE_DELAY GET_TAPPING_TERM(KC_MS_BTN1, &(keyrecord_t){})
|
||||
# define AUTO_MOUSE_DELAY GET_TAPPING_TERM(QK_MOUSE_BUTTON_1, &(keyrecord_t){})
|
||||
#endif
|
||||
#ifndef AUTO_MOUSE_DEBOUNCE
|
||||
# define AUTO_MOUSE_DEBOUNCE 25
|
||||
|
@ -16,3 +16,42 @@
|
||||
#define RGB_VAD QK_UNDERGLOW_VALUE_DOWN
|
||||
#define RGB_SPI QK_UNDERGLOW_SPEED_UP
|
||||
#define RGB_SPD QK_UNDERGLOW_SPEED_DOWN
|
||||
|
||||
#define KC_MS_UP QK_MOUSE_CURSOR_UP
|
||||
#define KC_MS_U QK_MOUSE_CURSOR_UP
|
||||
#define KC_MS_DOWN QK_MOUSE_CURSOR_DOWN
|
||||
#define KC_MS_D QK_MOUSE_CURSOR_DOWN
|
||||
#define KC_MS_LEFT QK_MOUSE_CURSOR_LEFT
|
||||
#define KC_MS_L QK_MOUSE_CURSOR_LEFT
|
||||
#define KC_MS_RIGHT QK_MOUSE_CURSOR_RIGHT
|
||||
#define KC_MS_R QK_MOUSE_CURSOR_RIGHT
|
||||
#define KC_MS_BTN1 QK_MOUSE_BUTTON_1
|
||||
#define KC_BTN1 QK_MOUSE_BUTTON_1
|
||||
#define KC_MS_BTN2 QK_MOUSE_BUTTON_2
|
||||
#define KC_BTN2 QK_MOUSE_BUTTON_2
|
||||
#define KC_MS_BTN3 QK_MOUSE_BUTTON_3
|
||||
#define KC_BTN3 QK_MOUSE_BUTTON_3
|
||||
#define KC_MS_BTN4 QK_MOUSE_BUTTON_4
|
||||
#define KC_BTN4 QK_MOUSE_BUTTON_4
|
||||
#define KC_MS_BTN5 QK_MOUSE_BUTTON_5
|
||||
#define KC_BTN5 QK_MOUSE_BUTTON_5
|
||||
#define KC_MS_BTN6 QK_MOUSE_BUTTON_6
|
||||
#define KC_BTN6 QK_MOUSE_BUTTON_6
|
||||
#define KC_MS_BTN7 QK_MOUSE_BUTTON_7
|
||||
#define KC_BTN7 QK_MOUSE_BUTTON_7
|
||||
#define KC_MS_BTN8 QK_MOUSE_BUTTON_8
|
||||
#define KC_BTN8 QK_MOUSE_BUTTON_8
|
||||
#define KC_MS_WH_UP QK_MOUSE_WHEEL_UP
|
||||
#define KC_WH_U QK_MOUSE_WHEEL_UP
|
||||
#define KC_MS_WH_DOWN QK_MOUSE_WHEEL_DOWN
|
||||
#define KC_WH_D QK_MOUSE_WHEEL_DOWN
|
||||
#define KC_MS_WH_LEFT QK_MOUSE_WHEEL_LEFT
|
||||
#define KC_WH_L QK_MOUSE_WHEEL_LEFT
|
||||
#define KC_MS_WH_RIGHT QK_MOUSE_WHEEL_RIGHT
|
||||
#define KC_WH_R QK_MOUSE_WHEEL_RIGHT
|
||||
#define KC_MS_ACCEL0 QK_MOUSE_ACCELERATION_0
|
||||
#define KC_ACL0 QK_MOUSE_ACCELERATION_0
|
||||
#define KC_MS_ACCEL1 QK_MOUSE_ACCELERATION_1
|
||||
#define KC_ACL1 QK_MOUSE_ACCELERATION_1
|
||||
#define KC_MS_ACCEL2 QK_MOUSE_ACCELERATION_2
|
||||
#define KC_ACL2 QK_MOUSE_ACCELERATION_2
|
||||
|
@ -220,10 +220,10 @@ uint16_t get_alt_repeat_key_keycode(void) {
|
||||
{KC_BRIU, KC_BRID}, // Brightness Up / Down.
|
||||
#endif // EXTRAKEY_ENABLE
|
||||
#ifdef MOUSEKEY_ENABLE
|
||||
{KC_MS_L, KC_MS_R}, // Mouse Cursor Left / Right.
|
||||
{KC_MS_U, KC_MS_D}, // Mouse Cursor Up / Down.
|
||||
{KC_WH_L, KC_WH_R}, // Mouse Wheel Left / Right.
|
||||
{KC_WH_U, KC_WH_D}, // Mouse Wheel Up / Down.
|
||||
{MS_LEFT, MS_RGHT}, // Mouse Cursor Left / Right.
|
||||
{MS_UP, MS_DOWN}, // Mouse Cursor Up / Down.
|
||||
{MS_WHLL, MS_WHLR}, // Mouse Wheel Left / Right.
|
||||
{MS_WHLU, MS_WHLD}, // Mouse Wheel Up / Down.
|
||||
#endif // MOUSEKEY_ENABLE
|
||||
};
|
||||
// clang-format on
|
||||
|
@ -225,25 +225,25 @@ std::map<uint16_t, std::string> KEYCODE_ID_TABLE = {
|
||||
{KC_ASSISTANT, "KC_ASSISTANT"},
|
||||
{KC_MISSION_CONTROL, "KC_MISSION_CONTROL"},
|
||||
{KC_LAUNCHPAD, "KC_LAUNCHPAD"},
|
||||
{KC_MS_UP, "KC_MS_UP"},
|
||||
{KC_MS_DOWN, "KC_MS_DOWN"},
|
||||
{KC_MS_LEFT, "KC_MS_LEFT"},
|
||||
{KC_MS_RIGHT, "KC_MS_RIGHT"},
|
||||
{KC_MS_BTN1, "KC_MS_BTN1"},
|
||||
{KC_MS_BTN2, "KC_MS_BTN2"},
|
||||
{KC_MS_BTN3, "KC_MS_BTN3"},
|
||||
{KC_MS_BTN4, "KC_MS_BTN4"},
|
||||
{KC_MS_BTN5, "KC_MS_BTN5"},
|
||||
{KC_MS_BTN6, "KC_MS_BTN6"},
|
||||
{KC_MS_BTN7, "KC_MS_BTN7"},
|
||||
{KC_MS_BTN8, "KC_MS_BTN8"},
|
||||
{KC_MS_WH_UP, "KC_MS_WH_UP"},
|
||||
{KC_MS_WH_DOWN, "KC_MS_WH_DOWN"},
|
||||
{KC_MS_WH_LEFT, "KC_MS_WH_LEFT"},
|
||||
{KC_MS_WH_RIGHT, "KC_MS_WH_RIGHT"},
|
||||
{KC_MS_ACCEL0, "KC_MS_ACCEL0"},
|
||||
{KC_MS_ACCEL1, "KC_MS_ACCEL1"},
|
||||
{KC_MS_ACCEL2, "KC_MS_ACCEL2"},
|
||||
{QK_MOUSE_CURSOR_UP, "QK_MOUSE_CURSOR_UP"},
|
||||
{QK_MOUSE_CURSOR_DOWN, "QK_MOUSE_CURSOR_DOWN"},
|
||||
{QK_MOUSE_CURSOR_LEFT, "QK_MOUSE_CURSOR_LEFT"},
|
||||
{QK_MOUSE_CURSOR_RIGHT, "QK_MOUSE_CURSOR_RIGHT"},
|
||||
{QK_MOUSE_BUTTON_1, "QK_MOUSE_BUTTON_1"},
|
||||
{QK_MOUSE_BUTTON_2, "QK_MOUSE_BUTTON_2"},
|
||||
{QK_MOUSE_BUTTON_3, "QK_MOUSE_BUTTON_3"},
|
||||
{QK_MOUSE_BUTTON_4, "QK_MOUSE_BUTTON_4"},
|
||||
{QK_MOUSE_BUTTON_5, "QK_MOUSE_BUTTON_5"},
|
||||
{QK_MOUSE_BUTTON_6, "QK_MOUSE_BUTTON_6"},
|
||||
{QK_MOUSE_BUTTON_7, "QK_MOUSE_BUTTON_7"},
|
||||
{QK_MOUSE_BUTTON_8, "QK_MOUSE_BUTTON_8"},
|
||||
{QK_MOUSE_WHEEL_UP, "QK_MOUSE_WHEEL_UP"},
|
||||
{QK_MOUSE_WHEEL_DOWN, "QK_MOUSE_WHEEL_DOWN"},
|
||||
{QK_MOUSE_WHEEL_LEFT, "QK_MOUSE_WHEEL_LEFT"},
|
||||
{QK_MOUSE_WHEEL_RIGHT, "QK_MOUSE_WHEEL_RIGHT"},
|
||||
{QK_MOUSE_ACCELERATION_0, "QK_MOUSE_ACCELERATION_0"},
|
||||
{QK_MOUSE_ACCELERATION_1, "QK_MOUSE_ACCELERATION_1"},
|
||||
{QK_MOUSE_ACCELERATION_2, "QK_MOUSE_ACCELERATION_2"},
|
||||
{KC_LEFT_CTRL, "KC_LEFT_CTRL"},
|
||||
{KC_LEFT_SHIFT, "KC_LEFT_SHIFT"},
|
||||
{KC_LEFT_ALT, "KC_LEFT_ALT"},
|
||||
|
Loading…
x
Reference in New Issue
Block a user