diff options
| author | fauxpark <fauxpark@gmail.com> | 2019-10-16 10:02:09 +1100 |
|---|---|---|
| committer | Joel Challis <git@zvecr.com> | 2019-10-16 00:02:09 +0100 |
| commit | 63f4806d7a67100fdf37b5f557ceb9d0982c0775 (patch) | |
| tree | c942f96e391b32e91753516fe0b07af639fc5b97 /tmk_core | |
| parent | 45225190794b438129d5b27d4fe5b756fdf2efc4 (diff) | |
| download | qmk_firmware-63f4806d7a67100fdf37b5f557ceb9d0982c0775.tar.gz qmk_firmware-63f4806d7a67100fdf37b5f557ceb9d0982c0775.zip | |
Fix bug in `do_code16()` (#6935)
* Fix bug in `do_code16()`
* Remove qk_ mods functions
Diffstat (limited to 'tmk_core')
| -rw-r--r-- | tmk_core/common/action.c | 30 | ||||
| -rw-r--r-- | tmk_core/common/action.h | 2 |
2 files changed, 28 insertions, 4 deletions
diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index 1ba38a285..44b19d368 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c | |||
| @@ -868,9 +868,9 @@ void tap_code(uint8_t code) { | |||
| 868 | unregister_code(code); | 868 | unregister_code(code); |
| 869 | } | 869 | } |
| 870 | 870 | ||
| 871 | /** \brief Utilities for actions. (FIXME: Needs better description) | 871 | /** \brief Adds the given physically pressed modifiers and sends a keyboard report immediately. |
| 872 | * | 872 | * |
| 873 | * FIXME: Needs documentation. | 873 | * \param mods A bitfield of modifiers to unregister. |
| 874 | */ | 874 | */ |
| 875 | void register_mods(uint8_t mods) { | 875 | void register_mods(uint8_t mods) { |
| 876 | if (mods) { | 876 | if (mods) { |
| @@ -879,9 +879,9 @@ void register_mods(uint8_t mods) { | |||
| 879 | } | 879 | } |
| 880 | } | 880 | } |
| 881 | 881 | ||
| 882 | /** \brief Utilities for actions. (FIXME: Needs better description) | 882 | /** \brief Removes the given physically pressed modifiers and sends a keyboard report immediately. |
| 883 | * | 883 | * |
| 884 | * FIXME: Needs documentation. | 884 | * \param mods A bitfield of modifiers to unregister. |
| 885 | */ | 885 | */ |
| 886 | void unregister_mods(uint8_t mods) { | 886 | void unregister_mods(uint8_t mods) { |
| 887 | if (mods) { | 887 | if (mods) { |
| @@ -890,6 +890,28 @@ void unregister_mods(uint8_t mods) { | |||
| 890 | } | 890 | } |
| 891 | } | 891 | } |
| 892 | 892 | ||
| 893 | /** \brief Adds the given weak modifiers and sends a keyboard report immediately. | ||
| 894 | * | ||
| 895 | * \param mods A bitfield of modifiers to register. | ||
| 896 | */ | ||
| 897 | void register_weak_mods(uint8_t mods) { | ||
| 898 | if (mods) { | ||
| 899 | add_weak_mods(mods); | ||
| 900 | send_keyboard_report(); | ||
| 901 | } | ||
| 902 | } | ||
| 903 | |||
| 904 | /** \brief Removes the given weak modifiers and sends a keyboard report immediately. | ||
| 905 | * | ||
| 906 | * \param mods A bitfield of modifiers to unregister. | ||
| 907 | */ | ||
| 908 | void unregister_weak_mods(uint8_t mods) { | ||
| 909 | if (mods) { | ||
| 910 | del_weak_mods(mods); | ||
| 911 | send_keyboard_report(); | ||
| 912 | } | ||
| 913 | } | ||
| 914 | |||
| 893 | /** \brief Utilities for actions. (FIXME: Needs better description) | 915 | /** \brief Utilities for actions. (FIXME: Needs better description) |
| 894 | * | 916 | * |
| 895 | * FIXME: Needs documentation. | 917 | * FIXME: Needs documentation. |
diff --git a/tmk_core/common/action.h b/tmk_core/common/action.h index 633cedb06..15f4ce15c 100644 --- a/tmk_core/common/action.h +++ b/tmk_core/common/action.h | |||
| @@ -90,6 +90,8 @@ void unregister_code(uint8_t code); | |||
| 90 | void tap_code(uint8_t code); | 90 | void tap_code(uint8_t code); |
| 91 | void register_mods(uint8_t mods); | 91 | void register_mods(uint8_t mods); |
| 92 | void unregister_mods(uint8_t mods); | 92 | void unregister_mods(uint8_t mods); |
| 93 | void register_weak_mods(uint8_t mods); | ||
| 94 | void unregister_weak_mods(uint8_t mods); | ||
| 93 | // void set_mods(uint8_t mods); | 95 | // void set_mods(uint8_t mods); |
| 94 | void clear_keyboard(void); | 96 | void clear_keyboard(void); |
| 95 | void clear_keyboard_but_mods(void); | 97 | void clear_keyboard_but_mods(void); |
