You are not logged in.

#1 2014-11-13 20:51:29

Hashwagon
Member
Registered: 2014-11-13
Posts: 1

Razer Naga Hotkey Setup

Hello,

I've been scouring the forums and web searches for configuring the Razer Naga thumb keys. There are 12 of them on the side which act as 1-0 or the num pad.

I've found multiple posts on this and somehow I'm still having issues:
https://bbs.archlinux.org/viewtopic.php?id=178839
https://bbs.archlinux.org/viewtopic.php?pid=1181482

The best fix on this seems to be running the below script. I placed this at /usr/share/gnome/autostart/naga.desktop, I'm running GDM+Gnome.

remote_id=$(
 xinput list |
 sed -n 's/.*Naga.*id=\([0-9]*\).*keyboard.*/\1/p'
)
[ "$remote_id" ] || exit

mkdir -p /tmp/xkb/symbols
cat >/tmp/xkb/symbols/custom <<\EOF
xkb_symbols "remote" {
 key <AE01> { [0x1008ff13] }; # Volume Up
 key <AE02> { [0xffcb] }; # F14
 key <AE03> { [0x1008ff11] }; # Volume Down
 key <AE04> { [0xffcd] }; # F16
 key <AE05> { [0xffce] }; # F17
 key <AE06> { [0xffcf] }; # F18
 key <AE07> { [0xffd0] }; # F19
 key <AE08> { [0xffd1] }; # F20
 key <AE09> { [0xffd2] }; # F21
 key <AE10> { [0xffd3] }; # F22
 #key <AE11> { [0xffd4] }; # F23
 #key <AE12> { [0xffd5] }; # F24
};
EOF

setxkbmap -device $remote_id -print | sed 's/\(xkb_symbols.*\)"/\1+custom(remote)"/' | xkbcomp -I/tmp/xkb -i $remote_id -synch - $DISPLAY 2>/dev/nul

After doing this my keys still register as 1-0 or the numpad, I checked the outputs in xev as well. Are there any dependency programs I'm missing? I've installed xorg-xinput and the forum threads posted above don't seem to mention any other prerequisites.

Any help or tips on this would be greatly appreciated.

Thanks

Offline

Board footer

Powered by FluxBB