Skip to main content
added 217 characters in body
Source Link
Lutz Willek
  • 802
  • 5
  • 10

showkeyThe command showkey reads from console device. If you start showkeyshowkey from a subshell, you have to redirect stdin:

#!/usr/bin/env bash
/usr/bin/showkey -a </dev/stdin

In case you want to use timeout, just allow the command showkey to read from the TTY and get TTY signals:

#!/usr/bin/env bash
timeout --foreground 10 /usr/bin/showkey -a </dev/stdin

showkey reads from console device. If you start showkey from a subshell, you have to redirect stdin:

#!/usr/bin/env bash
/usr/bin/showkey -a </dev/stdin

The command showkey reads from console device. If you start showkey from a subshell, you have to redirect stdin:

#!/usr/bin/env bash
/usr/bin/showkey -a </dev/stdin

In case you want to use timeout, just allow the command showkey to read from the TTY and get TTY signals:

#!/usr/bin/env bash
timeout --foreground 10 /usr/bin/showkey -a </dev/stdin
Source Link
Lutz Willek
  • 802
  • 5
  • 10

showkey reads from console device. If you start showkey from a subshell, you have to redirect stdin:

#!/usr/bin/env bash
/usr/bin/showkey -a </dev/stdin