ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

On Ubuntu 14.04 this works for me:

from Xlib import X, display

while True:
   d = display.Display().screen().root.query_pointer()._data
   if d["mask"] == 28:
      print "Triggered"
      break

(http://ubuntuforums.org/showthread.php?t=1073760)

mask of 28 is (at least for my keyboard) triggered from ctrl+alt. This could be a starting point. And please publish your findings here :)

On Ubuntu 14.04 this works for me:

sudo apt-get install python-xlib

from Xlib import X, display

while True:
   d = display.Display().screen().root.query_pointer()._data
   if d["mask"] == 28:
      print "Triggered"
      break

(http://ubuntuforums.org/showthread.php?t=1073760)

mask of 28 is (at least for my keyboard) triggered from ctrl+alt. This could be a starting point. And please publish your findings here :)