You are not logged in.

#1 2012-07-20 13:17:05

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,221
Website

[SOLVED] Configuring a Philips Speech Footcontrol USB device

Hi,
This morning I have wasted some time getting a USB Foot control device to work. The device should make it easy to control playback of an audio file with your foot while you're typing out the contents of the audio file.

With the help of mighty Google and our wiki, I was able to get the device recognized by the kernel and X (modprobe joydev and install the joystick input driver). It appears to be a joystick-device, and thus I could quite easily assign keycodes to the 'buttons' with an extra .conf-file inside /etc/X11/xorg.conf.d/.

The keycodes are printed to screen with 'xmodmap -pke' and I have found the keysims 'XF86AudioPlay', 'XF86AudioStop', 'XF86AudioForward' and 'XF86AudioRewind'.

In gnome, the USB Footcontrol device is able to start, pause and stop an audio file. 'Fast Forwarding' and 'Rewinding' are not recognized as 'hotkeys', so using totem or rhythmbox is no option (rewinding is very often necessary when transcribing speech).

VLC however has a lot more actions that can be bound to keys, f.e. 'rewind a little', 'rewind normal', etc. BUT: VLC does not recognize all keysims, as it appears... Only 'XF86AudioStop' is mapped to 'Media Stop'. The other keysims are not recognized.

I feel like I'm so close to the answer that it would be a shame to quit now smile. I have documented my steps very carefully, so I will be adding this to the wiki once I have succeeded... Can anyone help me solve this problem?

THX!

Last edited by zenlord (2012-07-29 17:15:32)

Offline

#2 2012-07-20 13:49:34

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,530
Website

Re: [SOLVED] Configuring a Philips Speech Footcontrol USB device

Its not really clear exactly how far you have made it.

The output of xev for each foot-button would clarify this.

Xdotool *might* help depending on exactly where the snag is.  With xdotool you can, essentially have your WM map a foot-button to an xdotool command that would simulate a series of key presses or mouse movements/clicks so that would cause vlc to do what you wanted.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2012-07-20 18:29:19

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,221
Website

Re: [SOLVED] Configuring a Philips Speech Footcontrol USB device

Well, I'm not really sure how far I made it, because both gnome, xev and vlc seem to react differently to the 'keypresses'.

xev:
At some point, I got xev to output the keysims that I had bound in xorg.conf.d/ (iirc at least 3 out of 4 were recognized correctly). Right now, xev gets some input, but does not display the 'keysyms' that I have bound to the buttons/keys.

gnome:
XFAudioPlay, XFAudioRewind, XFAudioForward and XFAudioStop are working: tested in gnome settings 'hot keys'. The only downside here is that gnome doesn't have a hot key to rewind or fast forward an audio file

vlc:
only XFAudioStop is recognised as 'Media Stop', the other keysyms are simply not recognised. Vlc is the main goal, because it would be very handy to use the actions that vlc has onboard (skip a little forward, skip a very little forward, etc)

I will look into xdotool - maybe I can get something out of that is recognised by vlc.

Some output:

# cat /var/log/Xorg.0.log
(II) config/udev: Adding input device Philips Speech Processing Footcontrol USB (/dev/input/event7)
(**) Philips Speech Processing Footcontrol USB: Applying InputClass "joystick catchall"
(**) Philips Speech Processing Footcontrol USB: Applying InputClass "Philips Speech Processing Footcontrol USB"
(II) LoadModule: "joystick"
(II) Loading /usr/lib/xorg/modules/input/joystick_drv.so
(II) Module joystick: vendor="X.Org Foundation"
	compiled for 1.7.6.901, module version = 1.5.0
	Module class: X.Org XInput Driver
	ABI class: X.Org XInput driver, version 7.0
(**) Option "Device" "/dev/input/event7"
(**) Philips Speech Processing Footcontrol USB: always reports core events
(**) Option "StartKeysEnabled" "True"
(**) Option "MapButton1" "key=176"
(**) Option "MapButton2" "key=172"
(**) Option "MapButton3" "key=174"
(**) Option "MapButton4" "key=167"
(**) Philips Speech Processing Footcontrol USB (keys): always reports core events
(II) XINPUT: Adding extended input device "Philips Speech Processing Footcontrol USB" (type: JOYSTICK)
(II) Joystick: Philips Speech Processing Footcontrol USB. bus 0x3 vendor 0x911 product 0x91a version 0x100
(II) Joystick: found 2 axes, 4 buttons
(II) XINPUT: Adding extended input device "Philips Speech Processing Footcontrol USB (keys)" (type: JOYSTICK)
JOYSTICK: DebugLevel set to 0
(II) config/udev: Adding input device Philips Speech Processing Footcontrol USB (/dev/input/js0)
(**) Philips Speech Processing Footcontrol USB: Applying InputClass "Philips Speech Processing Footcontrol USB"
(II) No input driver/identifier specified (ignoring)
# xmodmap -pk | grep XF86Audio
    121    	0x1008ff12 (XF86AudioMute)	0x0000 (NoSymbol)	0x1008ff12 (XF86AudioMute)	
    122    	0x1008ff11 (XF86AudioLowerVolume)	0x0000 (NoSymbol)	0x1008ff11 (XF86AudioLowerVolume)	
    123    	0x1008ff13 (XF86AudioRaiseVolume)	0x0000 (NoSymbol)	0x1008ff13 (XF86AudioRaiseVolume)	
    171    	0x1008ff17 (XF86AudioNext)	0x0000 (NoSymbol)	0x1008ff17 (XF86AudioNext)	
    172    	0x1008ff14 (XF86AudioPlay)	0x1008ff31 (XF86AudioPause)	0x1008ff14 (XF86AudioPlay)	0x1008ff31 (XF86AudioPause)	
    173    	0x1008ff16 (XF86AudioPrev)	0x0000 (NoSymbol)	0x1008ff16 (XF86AudioPrev)	
    174    	0x1008ff15 (XF86AudioStop)	0x1008ff2c (XF86Eject)	0x1008ff15 (XF86AudioStop)	0x1008ff2c (XF86Eject)	
    175    	0x1008ff1c (XF86AudioRecord)	0x0000 (NoSymbol)	0x1008ff1c (XF86AudioRecord)	
    176    	0x1008ff3e (XF86AudioRewind)	0x0000 (NoSymbol)	0x1008ff3e (XF86AudioRewind)	
    208    	0x1008ff14 (XF86AudioPlay)	0x0000 (NoSymbol)	0x1008ff14 (XF86AudioPlay)	
    209    	0x1008ff31 (XF86AudioPause)	0x0000 (NoSymbol)	0x1008ff31 (XF86AudioPause)	
    215    	0x1008ff14 (XF86AudioPlay)	0x0000 (NoSymbol)	0x1008ff14 (XF86AudioPlay)	
    216    	0x1008ff97 (XF86AudioForward)	0x0000 (NoSymbol)	0x1008ff97 (XF86AudioForward)	
    234    	0x1008ff32 (XF86AudioMedia)	0x0000 (NoSymbol)	0x1008ff32 (XF86AudioMedia)

Thx!

Last edited by zenlord (2012-07-20 18:47:58)

Offline

#4 2012-07-20 18:45:36

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,221
Website

Re: [SOLVED] Configuring a Philips Speech Footcontrol USB device

Hmmm, I found this on my searches, and it might explain the differences between apps:
http://xcb.freedesktop.org/XCBToDoKeyboard/

Offline

#5 2012-07-29 17:14:30

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,221
Website

Re: [SOLVED] Configuring a Philips Speech Footcontrol USB device

I solved the problem by mapping the Footcontrol's buttons to Function keys F9, F10, F11 and F12. VLC recognizes the button presses and I am perfectly able to map those buttons to the desired actions.

# pacman -Sy xf86-input-joystick
# modprobe joydev
# nano /etx/X11/xorg.conf.d/50-philips-speech-footcontrol.conf
Section "InputClass"
        Identifier              "Footcontrol"
        Option  "Driver"        "joystick"
        Option  "StartKeysEnabled"      "True"
        MatchIsJoystick         "on"
        Option  "MapButton1"    "key=75" #Right: F9
        Option  "MapButton2"    "key=95" #Main: F11
        Option  "MapButton3"    "key=76" #Left: F10
        Option  "MapButton4"    "key=96" #Top: F12
EndSection

Find the keycodes for your device with

# xmodmap -pke

Last edited by zenlord (2012-07-29 17:19:35)

Offline

Board footer

Powered by FluxBB