Tweaking the Logitech R400 presenter tool on Linux
This article is outdated, please refer to a new version.
Updated on April 9th, 2013, after comments by Jim Diamond
For Christmas I received a Logitech R400 presenter tool as a replacement for the php|architect one that has now fallen apart. However, to use it together with my presentation system—pres2, about which I previously wrote—I need it to provide left and right arrow keypresses. By default its left and right buttons generate Prior and Next events in X.
It took me a while to get this to work, so in short, this is how I changed it. First of all, I created the file /etc/udev/logitech-r400 as root with contents:
0x70037 f5 0x70029 f11 0x7003E f11 0x7004B left 0x7004E right
This maps the two scan codes that the Play button (lower-left) both to f11, the empty screen button to f5 and the left and right buttons to the left and right arrow keys.
The first column represents the scancode, which I obtained by first looking up with input event the device was tied to:
stat -t /dev/input/by-id/usb-Logitech_USB_Receiver-event-kbd --printf "%N\n"
Which showed the following for me:
‘/dev/input/by-id/usb-Logitech_USB_Receiver-event-kbd’ -> ‘../event16’
Then with event16 I ran:
/lib/udev/keymap -i input/event16
And pressed all four buttons (and the Play button twice). This then showed up on the screen:
scan code: 0x7004B key code: pageup scan code: 0x7004E key code: pagedown scan code: 0x7003E key code: f5 scan code: 0x70029 key code: esc scan code: 0x70037 key code: dot
After creating the file, to test things I ran:
sudo /lib/udev/keymap input/event16 /etc/udev/logitech-r400
Which showed:
Remapped scancode 0x70037 to 0x3f (prior: 0x34) Remapped scancode 0x70029 to 0x57 (prior: 0x01) Remapped scancode 0x7003e to 0x57 (prior: 0x3f) Remapped scancode 0x7004b to 0x69 (prior: 0x68) Remapped scancode 0x7004e to 0x6a (prior: 0x6d)
After this ran, the presenter tool now sends the key presses that I want. To make this permanent, I added as root a new file /etc/udev/rules.d/logitech.rules, with as contents:
ENV{ID_VENDOR}=="Logitech*", ATTRS{idProduct}=="c52d", RUN+="keymap $name /etc/udev/logitech-r400"
The changes will now also persist after rebooting as well.
My first possibility to test the new tool will be at PHP Benelux where I will be giving a MongoDB tutorial on January 25th. Tickets are still available.
Comments
Very nice and useful. Thanks!
In new Ubuntu (13.10 or 14.04) this way have changed.
Now, you must edit the file: /lib/udev/hwdb.d/60-keyboard.hwdb
- Find for "Logitech Presenter R400" and change this lines:
-
KEYBOARD_KEY_070029=esc KEYBOARD_KEY_07003e=f5
Example:
- # Logitech Presenter R400 keyboard:usb:v046DpC52Dd*dc*dsc*dp*ic*isc*ip*in00*
-
KEYBOARD_KEY_070029=esc KEYBOARD_KEY_07003e=f5 KEYBOARD_KEY_070037=displaytoggle
After that, run this command: # udevadm hwdb --update
Now reboot you computer. And that's it!
Life Line
I've finished reading This Way Up. It's about maps, that went wrong.
It's a good read, but htyerr were several chapters that were written in a novel way (as a video transcript, a series of letters), and I found distracting from the a tail content. It'll have worked better in a produced video.
No mention of @openstreetmap though :-(
Updated a bench
Created a tree; Updated 3 humps and a waste_basket
The Early Cormorant Catches the Eel
Sorry, not the best photo! But I caught this Cormorant catching this large eel when looking for Bank Swallows, right next to Eel Pie Island in the Thames.
#Birds #BirdPhotography #BirdsOfMastodon #Photography #London
Updated an estate_agent office
I went to my nieces' birthday party yesterday.
The theme was pink, and that included all the food, mostly died with beet root.
Shock and horror this morning when doing number two. Not only was my turd dark red, it was also glittering at me. Apparently the carrot cake had edible glitter...
So now I know what's worse than glitter.
😂 ✨ 💩 🟣Long-Tailed Tit on a Branch with Lichen
I've been spending some time in random London local nature reserves.
Sitting and listening, and in fifteen minutes you spot countless species.
This one was in Ham Lands Local Nature Reserve near Teddington.
#london #BirdPhotogaphy #BirdsOfMastodon #Birds #LichenSubscribe
A Colourful Mandarin
In The Long Water in Kensington Palace Gardens, London.
Created 7 benches
Created 2 benches
Created a bench
I walked 7.3km in 2h28m39s
Added a note about a duplicate Papersmiths
I walked 4.1km in 49m02s
Fixed website
fix typo
Updated a bench
I walked 1.6km in 20m26s
I walked 1.1km in 11m49s
The Yellow Eye
A blue heron's head, with its very yellow stare-y eye.
#BirdPhotography #Photography #BirdsOfFediverse #BirdsOfMastodon #London
My little Lego box is telling me it really is quite warm outside.
Created a bicycle_parking and a crossing
I walked 3.3km in 41m56s








Shortlink
This article has a short URL available: https://drck.me/r400-a1r