Skip to content
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

Feature request: OS-dependent Key Overrides #1307

Open
lacbs opened this issue Nov 8, 2022 · 1 comment
Open

Feature request: OS-dependent Key Overrides #1307

lacbs opened this issue Nov 8, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@lacbs
Copy link

lacbs commented Nov 8, 2022

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.:

  • If you get events: "alt down", "shift down", left down", "left up", left down", "left up", "shift up", "alt up",
  • it should be translated to: "alt down", "shift down", [combination found: "alt up", "ctrl down", "left down"], "left up", "left down". "left up", "shift up", "ctrl up".
  • And not "alt down", "shift down", [combination found: "alt up", "ctrl down", "left down"], [combination gone: "left up", "ctrl up", "alt down"], [combination found: "alt up", "ctrl down", "left down"], [combination gone: "left up", "ctrl up", "alt down"], "shift up", "alt up".

Describe alternatives you've considered

  • On Windows, I used the Keyboard Manager from Powertoys to overcome this with a normal keyboard.
  • QMK has Key Overrides that solves this problem.
  • Kaleidoscope has MagicCombo and ShapeShifter which are similar, but they don't solve the problem (MagicCombo does not cancel the original input, ShapeShifter only works with shift).
  • Yet another solution could be using macros that depends on the OS and get used to them, but I rather use something like Key Overrides.
@lacbs lacbs added the enhancement New feature or request label Nov 8, 2022
@gedankenexperimenter
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants