yay -Syu
update, the internal keyboard didn’t work,but for the power button,sleep button,and two brightness adjusting keys using Fn(Fn+F5,Fn+F6)sudo pacman -S xf86-input-evdev
because the xf86-input-libinput does better in touchpad guesture.keytest.py
,then make it executable by sudo chmod +x keytest.py
#!/usr/bin/python
import struct
keyboardFile = open('/dev/input/event4','rb')
data = keyboardFile.read(24)
print(struct.unpack('4IHHI',data))
keyboardFile.close()
second execute the script by sudo ./keytest.py
and press key Q of your internal keyboard
you will get an output sequence like this:
(1599824380, 0, 226140, 0, 4, 4, 16)
(1599824380, 0, 226140, 0, 1, 16, 1)
(1599824380, 0, 226140, 0, 0, 0, 0)
(1599824380, 0, 358344, 0, 4, 4, 16)
(1599824380, 0, 358344, 0, 1, 16, 0)
(1599824380, 0, 358344, 0, 0, 0, 0)
NOTE :
the value 16
is the keycode python receive from device file,which we will examine it later by grep "KEY_Q" /usr/include/linux/input-event-codes.h
.
third get the predefined keycode of Q by grep "KEY_Q" /usr/include/linux/input-event-codes.h
,which outputs like this:
#define KEY_Q 16
#define KEY_QUESTION 214
if keycode matches,the driver is ready for use.
xorg.conf
file in /etc/X11
or /etc
like me, you can simply regenerate a new skeleton by sudo Xorg :0 -configure
/etc/X11
or /etc
:sudo cp /root/xorg.conf.new /etc/X11/xorg.conf
sudo cat /proc/bus/input/devices
,your output may contain some lines like this:I: Bus=0011 Vendor=0001 Product=0001 Version=ab41
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
S: Sysfs=/devices/platform/i8042/serio0/input/input4
U: Uniq=
H: Handlers=sysrq kbd event4 leds
B: PROP=0
B: EV=120013
B: KEY=402000000 3803078f800d001 feffffdfffefffff fffffffffffffffe
B: MSC=10
B: LED=7
which implies the device file of your internal keyboard is /dev/input/event4
sudo vim /etc/X11/xorg.conf
then find a block like this:Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
EndSection
modify it to the pattern as follows:Section "InputDevice"
Identifier "Keyboard0"
Driver "evdev"
Option "Device" "/dev/input/event4"
EndSection