kernc / logkeys

:memo: :keyboard: A GNU/Linux keylogger that works!
Other
765 stars 253 forks source link

Moonlander keyboard uses dev22 #234

Open codygman opened 3 years ago

codygman commented 3 years ago

For any users, this works and logs to stdout (replace - with your filepath to log to a file):

sudo logkeys -s --no-daemon -o - -d event22 --timestamp-every
I: Bus=0003 Vendor=3297 Product=1969 Version=0111
N: Name="ZSA Moonlander Mark I"
P: Phys=usb-0000:03:00.0-2.3/input0
S: Sysfs=/devices/pci0000:00/0000:00:01.3/0000:03:00.0/usb1/1-2/1-2.3/1-2.3:1.0/0003:3297:1969.000B/input/input34
U: Uniq=0
H: Handlers=sysrq kbd event22 leds 
B: PROP=0
B: EV=120013
B: KEY=1000000000007 ff9f207ac14057ff febeffdfffefffff fffffffffffffffe
B: MSC=10
B: LED=1f

I can attach more if needed, but wanted to avoid listing out all my devices if knowing them isn't necessary.

krvkir commented 3 months ago

Had the same problem with Moonlander keyboard. Logkeys couldn't detect it automatically, but provided the correct event, it worked fine.

In case someone is stuck with the same problem: the way to identify the correct event given in README didn't work for me. For any event number, I got some stuff printed on the screen, so they all looked the same. So I went to /dev/input/ and looked to the contents of by-id folder: the link named "Moonlander keyboard" or something lead to the correct event file.

In case it helps, Moonlander is detected as several deivces, including mouse and some control stuff:

~ cat /proc/bus/input/devices | grep -A 8 Moonlander
N: Name="ZSA Technology Labs Moonlander Mark I"
P: Phys=usb-0000:05:00.3-1.4/input0
S: Sysfs=/devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb3/3-1/3-1.4/3-1.4:1.0/0003:3297:1969.001B/input/input59
U: Uniq=
H: Handlers=sysrq kbd leds event8 
B: PROP=0
B: EV=120013
B: KEY=1000000000007 ff9f207ac14057ff febeffdfffefffff fffffffffffffffe
B: MSC=10
--
N: Name="ZSA Technology Labs Moonlander Mark I"
P: Phys=usb-0000:05:00.3-1.4/input2
S: Sysfs=/devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb3/3-1/3-1.4/3-1.4:1.2/0003:3297:1969.001D/input/input60
U: Uniq=
H: Handlers=event9 mouse0 
B: PROP=0
B: EV=17
B: KEY=ff0000 0 0 0 0
B: REL=1943
--
N: Name="ZSA Technology Labs Moonlander Mark I System Control"
P: Phys=usb-0000:05:00.3-1.4/input3
S: Sysfs=/devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb3/3-1/3-1.4/3-1.4:1.3/0003:3297:1969.001E/input/input61
U: Uniq=
H: Handlers=kbd event10 
B: PROP=0
B: EV=1b
B: KEY=40000001000000 1200000000 0 100000800000000 40000010cc00 10168000000000 0
B: ABS=10000000000
--
N: Name="ZSA Technology Labs Moonlander Mark I Consumer Control"
P: Phys=usb-0000:05:00.3-1.4/input3
S: Sysfs=/devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb3/3-1/3-1.4/3-1.4:1.3/0003:3297:1969.001E/input/input62
U: Uniq=
H: Handlers=kbd event11 
B: PROP=0
B: EV=1f
B: KEY=33fff 0 0 483ffff17aff32d bfd4444600000000 1 130ff38b17c000 677bfad9415fed 19ed68000004400 10000002
B: REL=1040
--
N: Name="ZSA Technology Labs Moonlander Mark I Keyboard"
P: Phys=usb-0000:05:00.3-1.4/input3
S: Sysfs=/devices/pci0000:00/0000:00:08.1/0000:05:00.3/usb3/3-1/3-1.4/3-1.4:1.3/0003:3297:1969.001E/input/input63
U: Uniq=
H: Handlers=sysrq kbd leds event258 
B: PROP=0
B: EV=120013
B: KEY=1000000000007 ff98007a000007ff febeffdfffefffff fffffffffffffffe
B: MSC=10