Open TaiTair opened 2 years ago
Ok so I figured what my problem was. I failed to realize that in system-wide mode I need to create my gendev and profiles under /etc/xdg/moltengamepad
. I also failed to realize that I needed to load my profile, either through a command or through moltengamepad.cfg.
The problem I'm having now is that parsec does not process the events correctly. If I go on gamepad-tester.com from my linux laptop I can see my keyboard acting correctly as an xbox360 gamepad. If I go on that website through parsec on my windows computer, then the events are not being processed correctly:
Here's my updated gendev:
# Asus built-in keyboard
[vendor=0xb05 product=0x1869]
# logitech mouse
# [vendor=0x46d product=0x400a]
# [ "Dummy" ]
# Options
name = "ttrkeyboard"
devname = "kb_"
exclusive = "true"
change_permissions = "false"
flatten = "false"
rumble = "false"
# Event mappings
key_esc = "escape", "Escape"
key_1 = "1", "Number 1"
key_2 = "2", "Number 2"
key_3 = "3", "Number 3"
key_4 = "4", "Number 4"
key_5 = "5", "Number 5"
key_6 = "6", "Number 6"
key_7 = "7", "Number 7"
key_8 = "8", "Number 8"
key_9 = "9", "Number 9"
key_0 = "0", "Number 0"
key_minus = "minus", "Minus"
key_equal = "equal", "Equal"
key_backspace = "backspace", "Backspace"
key_tab = "tab", "Tab"
key_q = "q", "Q"
key_w = "w", "W"
key_e = "e", "E"
key_r = "r", "R"
key_t = "t", "T"
key_y = "y", "Y"
key_u = "u", "U"
key_i = "i", "I"
key_o = "o", "O"
key_p = "p", "P"
key_leftbrace = "leftbrace", "["
key_rightbrace = "rightbrace", "]"
key_enter = "enter", "Enter"
key_leftctrl = "leftctrl", "LCTRL"
key_a = "a", "A"
key_s = "s", "S"
key_d = "d", "D"
key_f = "f", "F"
key_g = "g", "G"
key_h = "h", "H"
key_j = "j", "J"
key_k = "k", "K"
key_l = "l", "L"
key_semicolon = "semicolon", ";"
key_apostrophe = "apostrophe", "'"
key_grave = "grave", "`"
key_leftshift = "leftshift", "LSHIFT"
key_backslash = "backslash", "Backslash"
key_z = "z", "Z"
key_x = "x", "X"
key_c = "c", "C"
key_v = "v", "V"
key_b = "b", "B"
key_n = "n", "N"
key_m = "m", "M"
key_comma = "comma", ","
key_dot = "dot", "."
key_slash = "slash", "Slash"
key_rightshift = "rightshift", "RSHIFT"
key_kpasterisk = "kpasterisk", "Numpad *"
key_leftalt = "leftalt", "LALT"
key_space = "space", "Space"
key_capslock = "capslock", "Capslock"
key_f1 = "f1", "F1"
key_f2 = "f2", "F2"
key_f3 = "f3", "F3"
key_f4 = "f4", "F4"
key_f5 = "f5", "F5"
key_f6 = "f6", "F6"
key_f7 = "f7", "F7"
key_f8 = "f8", "F8"
key_f9 = "f9", "F9"
key_f10 = "f10", "F10"
key_numlock = "numlock", "Numlock"
key_scrolllock = "scrolllock", "Scrolllock"
key_kp7 = "kp7", "Numpad 7"
key_kp8 = "kp8", "Numpad 8"
key_kp9 = "kp9", "Numpad 9"
key_kpminus = "kpminus", "Numpad -"
key_kp4 = "kp4", "Numpad 4"
key_kp5 = "kp5", "Numpad 5"
key_kp6 = "kp6", "Numpad 6"
key_kpplus = "kpplus", "Numpad +"
key_kp1 = "kp1", "Numpad 1"
key_kp2 = "kp2", "Numpad 2"
key_kp3 = "kp3", "Numpad 3"
key_kp0 = "kp0", "Numpad 0"
key_kpdot = "kpdot", "Numpad ."
key_102nd = "KEY_102ND", "102ND"
key_f11 = "f11", "F11"
key_f12 = "f12", "F12"
key_kpenter = "kpenter", "Numpad Enter"
key_rightctrl = "rightctrl", "RCTRL"
key_kpslash = "kpslash", "Numpad /"
key_sysrq = "sysrq", "SYSRQ"
key_rightalt = "rightalt", "RALT"
key_home = "home", "Home"
key_up = "up", "Up Arrow"
key_pageup = "pageup", "Page Up"
key_left = "left", "Left Arrow"
key_right = "right", "Right Arrow"
key_end = "end", "End"
key_down = "down", "Down Arrow"
key_pagedown = "pagedown", "Page Down"
key_insert = "insert", "Insert"
key_delete = "delete", "Delete"
key_mute = "mute", "Mute"
key_volumedown = "volumedown", "Volume Down"
key_volumeup = "volumeup", "Volume Up"
key_power = "power", "Power"
key_kpequal = "kpequal", "Numpad ="
key_pause = "pause", "Pause"
key_kpcomma = "kpcomma", "Numpad ,"
key_leftmeta = "leftmeta", "Left SuperKey"
key_rightmeta = "rightmeta", "Right SuperKey"
key_compose = "compose", "Compose key"
key_calc = "calc", "Calculator"
key_sleep = "sleep", "Sleep"
key_nextsong = "nextsong", "Next Song"
key_playpause = "playpause", "Play/Pause"
key_previoussong = "previoussong", "Previous Song"
key_scrollup = "scrollup", "Scroll Up"
key_scrolldown = "scrolldown", "Scroll Down"
key_kpleftparen = "kpleftparen", "Numpad Left Parenthesis"
key_kprightparen = "kprightparen", "Numpad Right Parenthesis"
key_play = "play", "Play"
key_brightnessdown = "brightnessdown", "Brightness Down"
key_brightnessup = "brightnessup", "Brightness Up"
key_rfkill = "rfkill", "RFKILL"
key_micmute = "micmute", "Mute Microphone"
#btn_left = "btnleft", "Mouse left"
#btn_right = "btnright", "Mouse right"
#btn_middle = "btnmiddle", "Middle mouse"
#btn_forward = "btnforward", "Mouse forward"
#btn_back = "btnback", "Mouse back"
#rel_x = "REL_X", "Mouse X"
#rel_y = "REL_Y", "Mouse Y"
Here's my updated profile:
[ttrkeyboard]
escape = key(key_esc)
1 = key(key_1)
2 = key(key_2)
3 = key(key_3)
4 = key(key_4)
5 = key(key_5)
6 = key(key_6)
7 = key(key_7)
8 = key(key_8)
9 = key(key_9)
0 = key(key_0)
minus = key(key_minus)
equal = key(key_equal)
backspace = key(key_backspace)
tab = key(key_tab)
q = key(key_q)
w = left_y-
e = key(key_e)
r = key(key_r)
t = key(key_t)
y = key(key_y)
u = key(key_u)
i = key(key_i)
o = key(key_o)
p = key(key_p)
leftbrace = key(key_leftbrace)
rightbrace = key(key_rightbrace)
enter = key(key_enter)
leftctrl = key(key_leftctrl)
a = left_x-
s = left_y+
d = left_x+
f = key(key_f)
g = key(key_g)
h = key(key_h)
j = key(key_j)
k = key(key_k)
l = key(key_l)
semicolon = key(key_semicolon)
apostrophe = key(key_apostrophe)
grave = key(key_grave)
leftshift = key(key_leftshift)
backslash = key(key_backslash)
z = key(key_z)
x = key(key_x)
c = key(key_c)
v = key(key_v)
b = key(key_b)
n = key(key_n)
m = key(key_m)
comma = key(key_comma)
dot = key(key_dot)
slash = primary
rightshift = key(key_rightshift)
kpasterisk = key(key_kpasterisk)
leftalt = key(key_leftalt)
space = key(key_space)
capslock = key(key_capslock)
f1 = key(key_f1)
f2 = key(key_f2)
f3 = key(key_f3)
f4 = key(key_f4)
f5 = key(key_f5)
f6 = key(key_f6)
f7 = key(key_f7)
f8 = key(key_f8)
f9 = key(key_f9)
f10 = key(key_f10)
numlock = key(key_numlock)
scrolllock = key(key_scrolllock)
kp7 = key(key_kp7)
kp8 = key(key_kp8)
kp9 = key(key_kp9)
kpminus = key(key_kpminus)
kp4 = key(key_kp4)
kp5 = key(key_kp5)
kp6 = key(key_kp6)
kpplus = key(key_kpplus)
kp1 = key(key_kp1)
kp2 = key(key_kp2)
kp3 = key(key_kp3)
kp0 = key(key_kp0)
kpdot = key(key_kpdot)
KEY_102ND = key(key_102nd)
f11 = key(key_f11)
f12 = key(key_f12)
kpenter = key(key_kpenter)
rightctrl = key(key_rightctrl)
kpslash = key(key_kpslash)
sysrq = key(key_sysrq)
rightalt = key(key_rightalt)
home = key(key_home)
up = key(key_up)
pageup = key(key_pageup)
left = key(key_left)
right = key(key_right)
end = key(key_end)
down = key(key_down)
pagedown = key(key_pagedown)
insert = key(key_insert)
delete = key(key_delete)
mute = key(key_mute)
volumedown = key(key_volumedown)
volumeup = key(key_volumeup)
power = key(key_power)
kpequal = key(key_kpequal)
pause = key(key_pause)
kpcomma = key(key_kpcomma)
leftmeta = key(key_leftmeta)
rightmeta = key(key_rightmeta)
compose = key(key_compose)
calc = key(key_calc)
sleep = key(key_sleep)
nextsong = key(key_nextsong)
playpause = key(key_playpause)
previoussong = key(key_previoussong)
scrollup = key(key_scrollup)
scrolldown = key(key_scrolldown)
kpleftparen = key(key_kpleftparen)
kprightparen = key(key_kprightparen)
play = key(key_play)
brightnessdown = key(key_brightnessdown)
brightnessup = key(key_brightnessup)
rfkill = key(key_rfkill)
micmute = key(key_micmute)
Thanks for the hard work and sorry if I was being a bit harsh. Spending hours upon hours of settings things up for it to not work can be a bit frustrating.
I spent upwards of 8 hours today trying to configure moltengamepad. I followed all the documentation and reached a stalemate before opening this issue. To make my gendev I used this: https://github.com/jgeumlek/MoltenGamepad/blob/master/documentation/gendev.md To make my profile I used this: https://github.com/jgeumlek/MoltenGamepad/blob/master/documentation/profiles.md
To reach my intended goal I inspired myself from this post: https://github.com/jgeumlek/MoltenGamepad/issues/53
I'm trying to map keyboard keys to gamepad buttons and mouse movement to the joystick. Yes I am aware now that moltengamepad doesn't support mouse to joystick so I abandonned that.
I painstakingly mapped most of the events of my keyboard so that I could still use my keyboard alongside emulating a gamepad.
Here's my gendev:
My profile is just a test profile with a few useful things like press A (on the gamepad), press Enter, press CTRL and press C.
When I launch moltengamepad it complains about not being able to change permissions and then it starts spamming Enter. What happens is that 1. I can't see any output from moltengamepad in the console because it spams Enter. 2. I have to reboot my computer because that effectively locks up my keyboard. Edit: This seems to have been caused by my own negligence, I was running moltengamepad in the background as a service and also trying to run it from the command-line at the same time.
Here's my udev rules to expose both mouse and keyboard:
Interestingly enough the keyboard was exposed for my normal user this way but not the mouse, even though the hex codes are correct. (Double and triple checked)