VOOZH about

URL: https://wiki.archlinux.org/title/Talk:Keyboard_input

⇱ Talk:Keyboard input - ArchWiki


Jump to content
From ArchWiki
Latest comment: 1 March by Sunset in topic Improvements for configuration with VIA

getscancodes

Latest comment: 21 October 20132 comments2 people in discussion

getscancodes is very useful tool for grabbing scancodes. Quick howto for newbie

  • install getscancodes from aur #yaourt -Sya getscancodes
  • connect your device and recognize it #dmesg|tail -30
  • find the event id of the device (use grep) #cat /proc/bus/input/devices
  • run getscancodes #sudo getscancodes /dev/input/event18

I find that it easy just to use setkeycodes for a quick test # setkeycodes scancode keycode

I recommend on mapping the scancodes to a keycode with udev, just link to the wiki or merge the pages. Dhead (talk) 05:54, 21 October 2013 (UTC)

There's already a link to official instructions in Extra_Keyboard_Keys#See_also, so I'd say it's not necessary to add these to our wiki.
setkeycodes and mapping with udev are described in Map_scancodes_to_keycodes, which is just fine - I don't know what you mean...
Map_scancodes_to_keycodes and Extra_Keyboard_Keys are properly interlinked, and I'm against the merging at the moment because that would imply other pages should be merged too and the resulting page would be too long and hard to read.
-- Lahwaacz (talk) 13:00, 21 October 2013 (UTC)

Improvements for configuration with VIA

Latest comment: 1 March1 comment1 person in discussion

I went through a struggle to get VIA to work, and have some takeaways that might be good for this page:

(Forgive me if I butcher terms, udev is relatively new to me and I had never heard of logind sessions before now)

- Firefox does not support the right protocol for via. I used google-chrome from the AUR, but I think chromium should work. The Mozilla documentation for WebHID seems to have info on what will work or not.

- Using 99 as the ordering caused the rule to evaluate after the logind seats were applied to devices, so as a result uaccess wasn't assigning a seat, and my login session wasn't allowed to touch it. Using 70 fixed this.

- The MODE setting turned out to be superfluous for me; it works fine without it, and its presence didn't fix it when uaccess wasn't taking effect.

- I was able to lock it down a bit harder by specifying a vendor:device id, rather than opening up all hid devices

In the end, my config for a keychron K0 max is:

/etc/udev/rules.d/70-keychron-k0-max.rule

`KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="3434", ATTRS{idProduct}=="0a06", TAG+="uaccess"`

Of note, I am on Gnome with the GDM display manager under Wayland. The login system seems important for uaccess to work, but I don't really know any details in that area, so I can't say for sure if this works in other configurations.

Also, maybe not relevant for this page, but keychron has its own fork of VIA at launcher.keychron.com. The original VIA does not work with it, and furthermore, gives zero feedback when it fails to connect. Sunset (talk) 16:19, 1 March 2026 (UTC)