-
-
Notifications
You must be signed in to change notification settings - Fork 39k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I reverse behavior of KC_1 for programmer layout #148
Comments
So, there is a simple but not elegant solution to this. It's very possible @jackhumbert can come up with something better. Here's my idea:
This would be ugly when looking at the code (and it's really not a clever solution by any means) but I believe it will do what you want it to do. @jackhumbert what would be the not-stupid way to do this? :) Any ideas? |
I am currently doing something similar for implementing a BÉPO layout in firmware in order to use it with a Canadian Multilingual OS layout. I had a similar issue in that some characters in the default layer need to be shifted (easy) but not all characters in the shift layer actually need the shift. (I didn't push it yet so unfortunately I can't show you the code right now) My solution is a bit different: I use a macro to toggle the shifted layer and at the same time toggle the shift key (( Then for the keys that don't need to be shifted (all numbers + a few others), I use macros that unregister shift on key press, and register it again on key release. Note that there is an issue with the |
Thanks for the comments. I wanted a clean solution. I don't prefer to make a second layer just for 1 to 0. I rather get used to SYMB layer. I have looked at almost all the examples. If I can query a state of a key, I can then determine if SHIFT key is already pressed or not pressed. I can try using global variable which sets it true any one or both SHIFT keys are pressed. Ideally, if we should have REVERSE(KC_KEY) which just reverse the behavior of KC_1. I am trying to understand this code but probably c is not my cup of tea. |
The real problem here is that the OS is interpreting the KC_1 and KC_LSFT keys to generate the |
@moonrumble Your problem is indeed a bit different, but #121 would provide a solution for it. Alternatively, after your previous comment I had another idea: you could implement all numbers as macros that check whether shift is currently pressed. So on macro key press:
Note that You won't have repeating keys (that would be a bit more complex to implement) but I guess it's fine for symbols and numbers. Note that if you implement it as @ezuk suggests, you will probably run into #156. |
Thanks every one for the comments. I will close this issue. |
- new macro_mods bit field for mods applied by macros - weak_mods now only used for ACT_{L,R}MODS (i.e. LSFT, RSFT, LCTL etc.) - clear the _weak_ mods on every key *pressed* such that LSFT etc. can no more interfere with the next key
* [Keychron C1 RGB] 48 MHz + VIA Support + etc. - Run Keychron C1 RGB MCU at 48 MHz. - Add VIA keymap for VIA support. - Disabled `KEYBOARD_SHARED_EP` for it is no longer needed. - Removed custom keycode for restarting keyboard as it is no longer needed. - Slightly updated readme.md. * [Keychron C1 RGB] Update readme.md * [Keychron C1] Update description * [Keychron C1 RGB] Update readme.md * Update readme.md * [Keychron C1] Fix RGB Toggle Keybind Bug Pt. 1 * [Keychron C1 RGB] Fix RGB Toggle Keybind Bug Pt. 2 * [Keychron C1] Fix for coding oversight * [Keychron C1 RGB] Fix keyboard path * [Keychron C1 RGB] Organize `info.json` formatting * [Keychron C1 RGB] Merge some files * [Keychron C1 RGB] Update VIA keymap * [Keychron C1 RGB] Attempt to fix conflict * Revert "[Keychron C1 RGB] Merge some files" This reverts commit 2cfa086. * Revert "[Keychron C1 RGB] Update VIA keymap" This reverts commit 4b9d518. * [Keychron C1 RGB] Minor fix keymap * Update keymap.c * [Keychron C1 RGB] Change VID and PID * Revert "Update readme.md" This reverts commit f7d350b. * [Keychron C1 RGB] Remove note - The keyboard now uses a different VID and PID. Thus this issue will no longer be evident. * Revert "[Keychron C1 RGB] Fix keyboard path" This reverts commit 305c80a.
Co-authored-by: gerardo_nevarez <[email protected]>
I would like to swap numbers with symbols in the top row.
I have looked at all the examples available. I believe I have to create a custom behavior using FN keys.
does a macro or shortcut exists which reverse the behavior of the key when shift key is pressed.
https://www.kaufmann.no/roland/dvorak/
The text was updated successfully, but these errors were encountered: