-
-
Notifications
You must be signed in to change notification settings - Fork 38.9k
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
Add native one-handed support #671
Conversation
This adds an action, `ACTION_SWAP_HANDS`, that swaps the the keys on the keyboard across a keymap-defined hemisphere in order to support one-hand typing without requiring a separate one-handed layer. See updated `doc/keymap.md` for more information.
Awesome! Thanks :) |
Do I have to use KC_FN0 to activate the feature? I tried to set it up without a function action, instead using regular key code. But it doesn't seem to work. It compiles okay. And it seems to recognize the options and the SWAP key code. Tapping space bar doesn't type a space until release (as expected). Holding space doesn't type a space at all on release (as expected). But it never swaps any keys. It types all keys the same whether I'm holding space or not. |
@jackhumbert Any suggestions from you, to try and get this to work? Maybe you could try it out on a board real quick, just to verify for me that I'm not crazy. |
I tried it and sure enough it doesn't work if you just put the action code in the map. Not sure why. Hopefully Jack has some insight into what the difference is. |
Meh. Thats good enough. At least I know how to fix it now. |
I have mine in the action functions, I didn't think to try it the way you have it in your example. |
Hmm. I'm trying to figure out how the docs on swap hands disappeared. They're not in the keymap.md anymore. |
Looks like it disappeared in the doc refactoring. I've recreated them in pull request #2489. |
This PR adds the ability to bind a key to swap the keyboard layout to support one-hand typing. Nominally this means mirroring the keyboard, but the map is configurable so this can be used, for instance, to swap between QWERTY and COLEMAK without defining a new layer.
The swap happens very early in key resolution so it is compatible with layers, tap dance, leader keys, etc. It simply rewrites col/row from the matrix decoder to a (potentially) different col/row. The redirect is remembered so key releases occur on the same key as the press, regardless of the current swap state. This state is a simple bitmap and with a small memory footprint of 8/16/32 bits per row depending on the number of columns (i.e. 4*16 bits for Planck).
I have a partial change to add one-shot support to the one-hand key but it is not included here. I think some refactoring of one-shot is in order as the interactions between mod, layer, and one-hand one-shots gets very complicated.