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

access the last key pressed (magic key) #3895

Open
TiDemieH opened this issue Aug 12, 2024 · 1 comment
Open

access the last key pressed (magic key) #3895

TiDemieH opened this issue Aug 12, 2024 · 1 comment

Comments

@TiDemieH
Copy link

I want to implement a key which changes its output based on the last key I pressed (a magic key), for example a key that repeats the last key I pressed. I would like to find which key I pressed last using Karabiner and not a separate keylogger.

Is there a way to use a karabiner keypress-activated shell scripts to either

  1. receive keypresses from karabiner-grabber?
  2. extract logged keypresses from somewhere else like Event-Viewer? (which already has UI logs but I don't know how to interact with that)
  3. detect final output from karabiner's virtual keyboard?

All help is appreciated.

@tekezo
Copy link
Member

tekezo commented Aug 16, 2024

Basically, there's no way to send key inputs outside of karabiner_grabber, and while there are exceptional methods using complex modifications, I wouldn't recommend them. Such approaches could allow other processes to capture keystrokes without permission.
I suggest considering whether it's possible to achieve your goal with complex modifications.

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

No branches or pull requests

2 participants