Comments (3)
Hi @baracudaz . I'm using retropie 4.1 and I have only tested it with that version of ES.
the file /etc/udev/rules.d/40-uinput.rules
should have been installed by the python-uinput package. So I can't say for sure if it will be guaranteed to work on other distros without some extra work required.
For me the 40-uinput.rules
file looks like the following
ACTION=="add|change", KERNEL=="event[0-9]*", ENV{ID_VENDOR_ID}=="012a", ENV{ID_MODEL_ID}=="034b", ENV{ID_INPUT_KEYBOARD}="1", ENV{ID_INPUT_TABLET}="1"
SUBSYSTEM=="input", ATTRS{name}=="python-uinput", ENV{ID_INPUT_KEYBOARD}="1"
KERNEL=="uinput", MODE:="0666"
Did you set your keyboard up first with ES ? as the script reads your retroarch.cfg to get your keyboard buttons and sends keypresses using uinput. Check the readme for supported keys .
So set up your keyboard as you normally would in ES then try the script.
I'm using python-uinput
version 0.10.2-1 and cec-utils
version 3.0.1-3~jessie
Also you can simply run cec-utils on its own to see if your remote is being detected.
For reference I run kodi in retropie. It is installed in the ports section and works fine.
from es-cec-input.
Here is couple of outputs from my setup. The TV remote is detected by your script with no issues.
I cannot setup ES with regular keyboard as the only access is via SSH or TV Remote control. However what I am struggling to understand how ES detects a valid keyboard (emulated by TV remove in our case)?
Could you kindly provide output:
.emulationstation/es_input.cfg
input_player1_*
setup from/opt/retropie/configs/all/retroarch.cfg
I found a couple of examples here. Now trying to figure out if I can re-use that.
For reference I run kodi in retropie. It is installed in the ports section and works fine.
See what you did there 👍
from es-cec-input.
I set up a keyboard first and then used that to set up a ps3 controller. once the ps3 controller was paired the keyboard was no longer needed so I plugged that out.
The "fake" keyboard is attached via a kernel module uinput and acts as a device attached at /dev/uinput , the python library interfaces with the uinput module to send key events, But a keyboard has to be configured first for ES to act on certain keypresses.
my es_input.cfg
<?xml version="1.0"?>
<inputList>
<inputAction type="onfinish">
<command>/opt/retropie/supplementary/emulationstation/scripts/inputconfiguration.sh</command>
</inputAction>
<inputConfig type="joystick" deviceName="Sony PLAYSTATION(R)3 Controller">
<input name="pageup" type="button" id="10" value="1"/>
<input name="start" type="button" id="3" value="1"/>
<input name="up" type="button" id="4" value="1"/>
<input name="a" type="button" id="13" value="1"/>
<input name="b" type="button" id="14" value="1"/>
<input name="down" type="button" id="6" value="1"/>
<input name="pagedown" type="button" id="11" value="1"/>
<input name="right" type="button" id="5" value="1"/>
<input name="x" type="button" id="12" value="1"/>
<input name="select" type="button" id="0" value="1"/>
<input name="y" type="button" id="15" value="1"/>
<input name="left" type="button" id="7" value="1"/>
</inputConfig>
<inputConfig type="keyboard" deviceName="Keyboard">
<input name="pageup" type="key" id="1073742049" value="1"/>
<input name="start" type="key" id="100" value="1"/>
<input name="up" type="key" id="1073741906" value="1"/>
<input name="a" type="key" id="97" value="1"/>
<input name="b" type="key" id="98" value="1"/>
<input name="down" type="key" id="1073741905" value="1"/>
<input name="pagedown" type="key" id="1073742053" value="1"/>
<input name="right" type="key" id="1073741903" value="1"/>
<input name="x" type="key" id="120" value="1"/>
<input name="select" type="key" id="115" value="1"/>
<input name="y" type="key" id="121" value="1"/>
<input name="left" type="key" id="1073741904" value="1"/>
</inputConfig>
<inputConfig type="joystick" deviceName="PLAYSTATION(R)3 Controller">
<input name="pageup" type="button" id="10" value="1"/>
<input name="start" type="button" id="3" value="1"/>
<input name="up" type="button" id="4" value="1"/>
<input name="a" type="button" id="13" value="1"/>
<input name="b" type="button" id="14" value="1"/>
<input name="down" type="button" id="6" value="1"/>
<input name="pagedown" type="button" id="11" value="1"/>
<input name="right" type="button" id="5" value="1"/>
<input name="x" type="button" id="12" value="1"/>
<input name="select" type="button" id="0" value="1"/>
<input name="y" type="button" id="15" value="1"/>
<input name="left" type="button" id="7" value="1"/>
</inputConfig>
</inputList>
my retroarch.cfg player 1 keyboard input
input_player1_a = "a"
input_player1_b = "b"
input_player1_y = "y"
input_player1_x = "x"
input_player1_start = "d"
input_player1_select = "s"
input_player1_l = "shift"
input_player1_r = "rshift"
input_player1_left = "left"
input_player1_right = "right"
input_player1_up = "up"
input_player1_down = "down"
input_player1_l2 = "ctrl"
input_player1_r2 = "rctrl"
input_player1_l3 = "num1"
input_player1_r3 = "num2"
If you get it working you may need to add some code to the if statment so it does not run when osmc is running.
I'd say try copy the keyboard sections of both files and reboot and see if retropie prompts you for a keyboard.
from es-cec-input.
Related Issues (20)
- Setup problem, very new on unix HOT 1
- Missing 40-uinput.rules file HOT 2
- List index out of range HOT 1
- input_player1_analog_dpad_mode is parsed HOT 1
- Errors on line 209 (press_keys(lines.next(), device, keylist)) HOT 1
- The '', '' keys in your retroarch.cfg are unsupported by this script
- Start script after closing Kodi again HOT 21
- Problems testing the script
- CECTester name on device
- doubled input HOT 1
- Button to Open Kodi
- Don't work on RetroPie 4.6 HOT 4
- Retroarch.cfg HOT 5
- 'nte' key unsupported HOT 6
- keypresses not detected HOT 2
- Problem when exiting Kodi and returning to Emulationstation HOT 6
- Can't get CEC to work HOT 3
- CEC doesn't work when TV isn't powered on HOT 3
- Buttons
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from es-cec-input.