I have a program (advancemame) running on Raspian (Raspberry Pi) which like most programs gets its input from the keyboard. I'm using a program which implements
uinput to convert GPIO pins HI/LOW readings to key presses (pikeyd). I run
pikeyd in the background from the terminal, which has a GPIO pin mapped to key 5. I set the corresponding GPIO to HI, it prints out "5" to the terminal.
However, when I run
advancemame, it doesn't recognize the
uinput. If I unplug the keyboard and reboot, then
uinput and everything works. From what it looks like is the program will read the first input device,
input0 (keyboard). Is there a way to make
input0? That is, set the order of the input devices
$ ls /sys/class/input/ event0 event1 event2 input0 input1 input2 mice mouse0 mouse1 $ ls /sys/devices/virtual/input/input2/ capabilities event2 id modalias mouse1 name phys power properties subsystem event uniq
I'm not sure if there is a setting in
advancemame that will look at all input devices. I have 3 images I built from scratch, 1 of the 3 images works where
advancemame sees all the input devices. I can use my
uinput and the keyboard at the sometime. I've compared config settings between the images and can't seem to find why one works and the others don't. I am wondering if it may be a security permission.
Also, is there a way to disable event0 and event1? I am not using
xinput is not an option.
Here are my input devices:
pi@raspberrypi ~ $ cat /proc/bus/input/devices I: Bus=0003 Vendor=0d62 Product=0500 Version=0100 N: Name="2.4G Wireless Keyboard with Touchpad" P: Phys=usb-bcm2708_usb-1.2/input0 S: Sysfs=/devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2:1.0/input/input0 U: Uniq= H: Handlers=sysrq kbd event0 B: PROP=0 B: EV=120013 B: KEY=10000 7 ff9f207a c14057ff febeffdf ffefffff ffffffff fffffffe B: MSC=10 B: LED=7 I: Bus=0003 Vendor=0d62 Product=0500 Version=0100 N: Name="2.4G Wireless Keyboard with Touchpad" P: Phys=usb-bcm2708_usb-1.2/input1 S: Sysfs=/devices/platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2:1.1/input/input1 U: Uniq= H: Handlers=kbd mouse0 event1 B: PROP=0 B: EV=1f B: KEY=4837fff 72ff32d bf544446 0 0 1f0001 20f90 8b17c000 677bfa d9415fed 9ed680 4400 0 10000002 B: REL=143 B: ABS=7f01 0 B: MSC=10 I: Bus=0003 Vendor=0001 Product=0001 Version=0001 N: Name="uinput-sample" P: Phys= S: Sysfs=/devices/virtual/input/input2 U: Uniq= H: Handlers=sysrq kbd mouse1 rfkill event2 B: PROP=0 B: EV=100007 B: KEY=10000 ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe B: REL=3
Any help is appreciated.