You are not logged in.
Pages: 1
Hi,
I don't seem to get, how to use udev keymaps in a proper way and would appreciate any help on the subject.
I'm trying to get the Fn keys working on a samsung series 9 laptop I recently bought which makes this also a laptop issue but actually it's more about how udev keymaps work in general.
In /lib/udev/keymaps there already existed a "samsung-series-9" file and to keep it simple I'm just trying to get 1 of the Fn keys working that's not working properly right now which is the one turning the display brightness down, or in my case Fn+F2.
So to get the necessary key code I used the udev keymap tool:
# /lib/udev/keymap -i input/event0
Press ESC to finish, or Control-C if this device is not your primary keyboard
scan code: 0x89 key code: brightnessdown
scan code 0x01 key code: esc
In this example I pressed Fn+F2 to get the keycode which already and correctly seems to be "brightnessdown" which is exactly what I want.
Then I altered the already existing keymap and release file
/lib/udev/keymaps/samsung-series-9
0x89 brightnessdown # Fn+F2
/lib/udev/keymaps/force-release/samsung-series-9
# list of scancodes (hex or decimal), optional comment
0x89 # Fn+F2 brightness down
...and left the rule files untouched since they already contained:
/lib/udev/rules.d/95-keymap.rules
ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", RUN+="keymap $name samsung-other"
ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*SX20S*", RUN+="keymap $name samsung-sx20s"
ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="SQ1US", RUN+="keymap $name samsung-sq1us"
ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*700Z*", RUN+="keymap $name 0xBA ejectcd 0x96 keyboardbrightnessup 0x97 keyboardbrightnessdown"
ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*700T*", RUN+="keymap $name 0xAD leftmeta"
ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*90X3A*|*900X3*|*900X4*", RUN+="keymap $name samsung-series-9"
/lib/udev/rules.d/95-keyboard-force-release.rules:
ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", RUN+="keyboard-force-release.sh $devpath samsung-other"
ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*90X3A*|*900X3*|*900X4*", RUN+="keyboard-force-release.sh $devpath samsung-series-9"
I think the product_name regex should work, because when I cat my product_name I get this:
# cat /sys/class/dmi/id/product_name
900X3C/900X3D/900X3E/900X4C/900X4D
This is what I did, but unfortunately it's not working. What am I doing wrong?
I then tried another key, just to eliminate failure potential and picked the one which turns the keyboard backlight down, Fn+F9 in my case.
This resulted in:
# /lib/udev/keymap -i input/event0
Press ESC to finish, or Control-C if this device is not your primary keyboard
got scan code event 0x97 without a key code event
scan code 0x01 key code: esc
...and here I don't know how to continue at all.
So thanks in advance, any help is greatly appreciated!
-CREDD0R
Last edited by CREED0R (2013-07-28 09:30:53)
Offline
Sry for bump, but nobody got an idea? :((
Offline
Pages: 1