1

Is there any shell utility in Ubuntu which can define if the modifier key (Ctrl, Shift, Super, Alt) is pressed down on the moment when i run it?

KhaimovMR
  • 198
  • 1
  • 2
  • 8

2 Answers2

2

There is the xev utility which prints information about X events (including keypress events). It's available if you're running X11.

nameless
  • 1,969
  • 11
  • 34
1

Use showkey. Manpage is here.

David
  • 6,462
  • 2
  • 25
  • 22
  • `showkey` works fine, but you've got to use it with `-a` argument because without, - it requires the root privileges. – KhaimovMR Apr 10 '23 at 05:47