Closed tschager closed 12 years ago
I would happily include support for it, but I do not own the device. Could you send me information about how the device is recognized in Linux (i.e. the button presses are handled like mouse buttons or as keyboard events?). The program xev can help you with it.
Thanks for the fast reply...
The buttons are handled like keyboard events:
Maybe it would be easier to have some kind of config file, where one can define additional actions for keypress events...
xev output:
Black Screen button:
KeyPress event, serial 33, synthetic NO, window 0x5600001,
root 0xbf, subw 0x0, time 18435403, (282,320), root:(1307,372),
state 0x10, keycode 60 (keysym 0x2e, period), same_screen YES,
XLookupString gives 1 bytes: (2e) "."
XmbLookupString gives 1 bytes: (2e) "."
XFilterEvent returns: False
KeyRelease event, serial 36, synthetic NO, window 0x5600001,
root 0xbf, subw 0x0, time 18435587, (282,320), root:(1307,372),
state 0x10, keycode 60 (keysym 0x2e, period), same_screen YES,
XLookupString gives 1 bytes: (2e) "."
XFilterEvent returns: False
"Start Presentation" Button:
KeyPress event, serial 36, synthetic NO, window 0x5600001,
root 0xbf, subw 0x0, time 18541211, (159,-19), root:(1184,33),
state 0x10, keycode 9 (keysym 0xff1b, Escape), same_screen YES,
XLookupString gives 1 bytes: (1b) ""
XmbLookupString gives 1 bytes: (1b) ""
XFilterEvent returns: False
KeyRelease event, serial 36, synthetic NO, window 0x5600001,
root 0xbf, subw 0x0, time 18541379, (159,-19), root:(1184,33),
state 0x10, keycode 9 (keysym 0xff1b, Escape), same_screen YES,
XLookupString gives 1 bytes: (1b) ""
XFilterEvent returns: False
KeyPress event, serial 36, synthetic NO, window 0x5600001,
root 0xbf, subw 0x0, time 18542083, (159,-19), root:(1184,33),
state 0x10, keycode 71 (keysym 0xffc2, F5), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 36, synthetic NO, window 0x5600001,
root 0xbf, subw 0x0, time 18542235, (159,-19), root:(1184,33),
state 0x10, keycode 71 (keysym 0xffc2, F5), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
I had just added support for the black scren button on the master branch. Please test it.
The other button is a bit more problematic. The "on" button seems to be mapped to the Esc key, which is more naturally mapped to "exit presentation" (does it work like this in the current version?). The "off" button is equivalent to F5. I could map it to skip overlay, if this fits with the expected behaviour of the controller.
A config file is definitely a good idea, as the number of keybindings has grown. I will look into it!
The keycodes for on and off are reverted: keycode 71 (on) and 9 (off)
Off maps to Esc and it is actually working... How about this: keycode 71 has the freeze function and when the Esc key event is switching off the freeze function (if activated) and exit (otherwise). Only difference for keyboard-users would be, that they would have to press ESC twice, if they want to close pdfpc in freeze state
I changed the behavior in my fork as described above... However, this solution does not work, if you start freeze with the Presenter and stop it with the keyboard...
The basic functionality works fine, but the button for black screen is not supported right now. The second button (used for "starting the presentation" in other applications) could be used for skipping overlays...