yqrashawn / GokuRakuJoudo

config karabiner with ease
GNU General Public License v3.0
1.13k stars 122 forks source link

Change behavior when in text field #87

Open yomotherboard opened 3 years ago

yomotherboard commented 3 years ago

I would like to change the behavior when the curser is focused in a text field. For example I would like to map [:n :!Cn] but only when not in a text field. Maybe I am missing something and there is a way to do this.

If there isn't a way to do this then I see that I could use simlayers to do some kind of simulated vim input mode. If this is the better way to approach it then that would be good to know!

Anyway, if the feature doesn't exist, I thought maybe it might be a useful idea. More generally, if there was (or is) a way to keep karabiner up to date on where the cursor is focused (in a text field?), what the active window of the current application is, or other accessibility information, I feel like this would be very useful.

nikitavoloboev commented 3 years ago

If you figure out how to know whether you are in text field whether via applescript or something, you can have goku call a Keyboard Maestro macro or something to do this check and if it passes, do the action you want.

yqrashawn commented 3 years ago

Karabiner or goku can't know if user is in a text field. If you figured out how to universally detect that you can make a long running detection process and let process change karabiner's variable via karabiner-cli.