Notices


Reply
Thread Tools
Posts: 9 | Thanked: 2 times | Joined on Sep 2010
#1
Hello,

Does anyone know how to get which button is pressed in a bash script?

e.g. if the A button is pressed get a keynumber or an A or something like that. Same thing if shift is pressed, get the shift keynumber or shift or something...

Thanks!

Veda88
 
Posts: 2,076 | Thanked: 3,268 times | Joined on Feb 2011
#2
 
Posts: 9 | Thanked: 2 times | Joined on Sep 2010
#3
"read -n 1 keypress"

It wasn't exactly what i was looking for... I also wanted to get the keycode when youre not in the app or console anymore...

So, a different approach would be needed. Can't i read this directly from a /dev/ device?
 
Posts: 9 | Thanked: 2 times | Joined on Sep 2010
#4
Or maybe someone knows a keylogger written in just bash? I think i can figure out how it works with the code...
 
Posts: 915 | Thanked: 3,209 times | Joined on Jan 2011 @ Germany
#5
You could run xev from within Easy Debian. You have to run it from withing Easy Debian because you won't get useful output via debbie.
 
Reply


 
Forum Jump


All times are GMT. The time now is 14:10.