davvil / pdfpc

A presenter console with multi-monitor support for PDF files.
http://davvil.github.com/pdfpc/
GNU General Public License v2.0
210 stars 20 forks source link

Feature Request: Better support for Logitech Wireless Presenter #11

Closed tschager closed 12 years ago

tschager commented 12 years ago

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...

davvil commented 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.

tschager commented 12 years ago

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
davvil commented 12 years ago

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!

tschager commented 12 years ago

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

tschager commented 12 years ago

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...

davvil commented 12 years ago

Pull requested submitted. I close this issue and continue the discussion in the other one.