diff options
author | tmk <tmk@users.noreply.github.com> | 2015-12-09 12:03:07 +0900 |
---|---|---|
committer | tmk <tmk@users.noreply.github.com> | 2015-12-09 12:03:07 +0900 |
commit | 4e9170156ee83217a1379b2cae051de268831f38 (patch) | |
tree | 6d1e15b714d4fb27d2e6716c521dc5872b0ca24b | |
parent | fbbf8b501f151a4f69a34220ce388b603b213cce (diff) |
Updated FAQ Keymap (markdown)
-rw-r--r-- | FAQ-Keymap.md | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/FAQ-Keymap.md b/FAQ-Keymap.md index c38641eb07..e6f01f53c0 100644 --- a/FAQ-Keymap.md +++ b/FAQ-Keymap.md @@ -221,4 +221,29 @@ Dual-role key: https://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys `EJCT` keycode works on OSX. https://github.com/tmk/tmk_keyboard/issues/250 It seems Windows 10 ignores the code and Linux/Xorg recognizes but has no mapping by default. -Not sure what keycode Eject is on genuine Apple keyboard actually. HHKB uses `F20` for Eject key(`Fn+f`) on Mac mode but this is not same as Apple Eject keycode probably.
\ No newline at end of file +Not sure what keycode Eject is on genuine Apple keyboard actually. HHKB uses `F20` for Eject key(`Fn+f`) on Mac mode but this is not same as Apple Eject keycode probably. + + + +## What's weak_mods and real_mods in action_util.c +___TO BE IMPROVED___ + +real_mods is intended to retains state of real/physical modifier key state, while +weak_mods retains state of virtual or temprary modifiers which should not affect state real modifier key. + +Let's say you hold down physical left shift key and type ACTION_MODS_KEY(LSHIFT, KC_A), + +with weak_mods, +(1) hold down left shift: real_mods |= MOD_BIT(LSHIFT) +(2) press ACTION_MODS_KEY(LSHIFT, KC_A): weak_mods |= MOD_BIT(LSHIFT) +(3) release ACTION_MODS_KEY(LSHIFT, KC_A): waek_mods &= ~MOD_BIT(LSHIFT) +real_mods still keeps modifier state. + +without weak mods, +(1) hold down left shift: real_mods |= MOD_BIT(LSHIFT) +(2) press ACTION_MODS_KEY(LSHIFT, KC_A): real_mods |= MOD_BIT(LSHIFT) +(3) release ACTION_MODS_KEY(LSHIFT, KC_A): real_mods &= ~MOD_BIT(LSHIFT) +here real_mods lost state for 'physical left shift'. + +weak_mods is ORed with real_mods when keyboard report is sent. +https://github.com/tmk/tmk_keyboard/blob/master/tmk_core/common/action_util.c#L57 |