keyboardio / Kaleidoscope

Firmware for Keyboardio keyboards and other keyboards with AVR or ARM MCUs.
http://keyboard.io
GNU General Public License v3.0
759 stars 258 forks source link

Feature request: OS-dependent Key Overrides #1307

Open lacbs opened 1 year ago

lacbs commented 1 year ago

Is your feature request related to a problem? Please describe. Not exactly a problem with Kaleidoscope, but for someone that constantly switches O.S. (needs to work with MacOS and Windows, sometimes with Linux), I found myself using the wrong shortcuts. I tried to swap ctrl and cmd/win, but still, ctrl+c should continue to be ctrl+c (not win+c, which is a problem on terminal). ctrl+tab / alt+tab / win+tab gets mixed up all the time, and so the text navigation keys (option+arrow jump words in MacOS, but that's ctrl+arrow in Windwos and Linux).

Describe the solution you'd like Something like Key Overrides, which allows you to switch a key combination by another. It would be even better if that would depend on the HostOS.

Another solution (instead of manual key overrides) would be a plugin that completely remaps the shortcut behaviors from one OS to another (so we don't need to create this remap manually).

It would be nice to "hold" modifiers between strokes too. E.g.:

Describe alternatives you've considered

gedankenexperimenter commented 1 year ago

QMK Key Overrides looks like a generalized version of the Kaleidoscope CharShift plugin (which has a superset of both ShapeShifter and TopsyTurvy functionality). It wouldn't be particularly difficult to extend CharShift to use any of the five modifier flags and at least approximate QMK Key Overrides.

However, the problem of a single function having software-dependent keyboard shortcuts is much too complex to solve at the keyboard level. For example, most OS-level shortcuts on Mac OS use the cmd modifier where Linux and Windows use ctrl — but Emacs interprets ctrl the same way on all operating systems (and that's just one example). This problem is simply not possible for the keyboard firmware to solve in a general way. You could write code to translate combinations based on HostOS state, but I don't feel like there's a better way to do this than using a custom plugin to code the special cases that you're interested in.