The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
2

How to react to udev keymap keys without gnome-settings-daemon?

asked 2013-01-26 22:22:10 +0000

lkraav gravatar image

My laptop has a keymap /usr/lib64/udev/keymaps/samsung-90x3a:

0x96 kbdillumup         # Fn+F8 keyboard backlit up
0x97 kbdillumdown       # Fn+F7 keyboard backlit down
0xD5 wlan               # Fn+F12 wifi on/off
0xCE prog1              # Fn+F1 performance mode
0x8D prog2              # Fn+F6 battery life extender

And it works:

leho@s9 ~ $ [git:master+?] sudo input-events 4
/dev/input/event4
   bustype : BUS_I8042
   vendor  : 0x1
   product : 0x1
   version : 43841
   name    : "AT Translated Set 2 keyboard"
   phys    : "isa0060/serio0/input0"
   bits ev : EV_SYN EV_KEY EV_MSC EV_LED EV_REP

waiting for events
00:07:32.631989: EV_MSC MSC_SCAN 28
00:07:32.631995: EV_KEY KEY_ENTER released
00:07:32.631997: EV_SYN code=0 value=0
00:07:38.247388: EV_MSC MSC_SCAN 151
00:07:38.247394: EV_KEY KEY_KBDILLUMDOWN pressed
00:07:38.247396: EV_SYN code=0 value=0
00:07:38.247416: EV_KEY KEY_KBDILLUMDOWN released
00:07:38.247417: EV_SYN code=0 value=0

But what tools do I use with i3 to assign these keypresses to some script actions? gnome-settings-daemon takes care of it for Gnome, but I prefer not to run it inside i3.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2013-01-27 10:11:24 +0000

lkraav gravatar image

updated 2013-01-27 10:12:05 +0000

Get the keycodes with xev and then .i3/config

bindcode 237 exec xbacklight -inc 10

and so on. Magic! Thank you for your attention :)

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-01-26 22:22:10 +0000

Seen: 566 times

Last updated: Jan 27 '13