Tuesday, February 19, 2013

linux: simulate key press

i have an application on fedora that launches on boot and displays a primary interface. since i wanted it to automatically display its secondary interface, which is accessible by menu or by pressing ctr + 2, i looked for a key  press simulator. xautomation does it well. here's all that i did:

1. install xautomation via yum
and
2. create a script, to simulate my ctr + 2, with the ff contents:
# xte 'keydown Control_L' 'key 2' 'keyup Control_L'

works for me just fine ;)

No comments:

Post a Comment

SSH : No matching host key type found. Their offer: ssh-rsa,ssh-dss

Got this while connecting to my mikrotik router via ssh   Unable to negotiate with <ip address> port <ssh port>: no matching hos...