olegos2 / mobox

3.04k stars 136 forks source link

Keyboard and Mouse support #169

Closed Jacobw1oo closed 6 months ago

Jacobw1oo commented 9 months ago

Mobox has Keyboard and Mouse support until you start a game. My phone has native support for mouse, keyboard, controllers.

Tested with and without ib.exe and plugandplay.exe on Factorio. The mouse works perfectly but keyboard has no input. Some games Skyrim, Starwars 2 (classic), the keyboard works perfectly but no mouse.

I guess there is an input focus and only selects one input with a race condition.

Notes: Input bridge is cause massive lag, 50% - 80% fps lost while holding inputs.

hisham2630 commented 9 months ago

@Jacobw1oo you don't need input bridge for mouse and keyboard just open termx11 settings and set this Screenshot_2024-02-07-23-02-28-873_com termux x11-edit

Jacobw1oo commented 9 months ago

I have set those settings and it fix some but not all. OK, so certain games testing now.

Jacobw1oo commented 9 months ago

Native resolution = (2480 x 1116) Steam is more stable at lower resolution (960x540)

Games List for mobox wow64 - wine 91 wow64, by default they all are using dxvk 2.0 async Backppack hero (D3D11 FL11_1) | Nearly Perfect 9/10, need to test native resolution Call of Duty | wont Start Core Keeper (D3D11 FL11_1) | low: have to use not use 960x540 resoltion and it flickers badly. on native i get about 10 fps. Currenlty 5/10 Counter-strike 1.6 (No info) | Runs Perfect, controlls are unplayable Counter-strike source (D3D9Ex) | Runs Great, flickers, controlls are unplayable. I get 50 fps on Native resolution Dark Souls Prepare to Die | low: start well, loads well, mouse and keyboard work, the display (960x540) is just black - Native resolution failed retest with DXVK 1.3 Dead by Daylight | Easy anti cheat caused issue - Due for rebuild Depths of Peril (No info) | Runs great on native resolution, hard to see it a old pc game. Dicey Dungeons (No info)| Runs perfectly but keyboard does not work 10/10 (only need esc key to exit) Dream Engine: Nomad Cities (D3D11 FL11_1) | wont Start: starts well, Unity crash with flickers, total system lockup Morrowind | NA: has an error might be due to openmwn, it has no listed resolutions, must manual fix Skyrim (D3D9) | Works great, 30 fps at native, and ?? at 960x540 (it has no listed resolutions). Issue with mouse not being bound Factorio (D3D11 FL11_1) | At native resolution and 960x540 would not start | before Works well, load is a bit slow, 60 FPS capped 445 FTL: Faster than Light | wont start Garry's mod (D3D9Ex) | pop up and then closes (Native and 960) GTA V | issues with social club, due for rebuild Graveyard Keeper (D3D11 FL11_1) | Runs great, load is a little slow, controll work. but weird display error, where is scrolls off the screen 8/10 Half-Life (No info) | Runs Perfect, keyboard and mouse works, forgot the does not use mouse to look (it uses arrow keys) Half-Life 2 (D3D9Ex) | Playable, but mouse works and keyboard does not. display flickers Hotline Miami | wont Start Iron Grip Warlord | Runs pefectly (it set the display to 1920x1080 ~ 50 fps(I can boost it)), controls are completly busted, keyboard does not work, and mouse is not bound. Just Cause 2 | pop up and then crashes (Native and 960) L4D | Great: Starts, loading is a little slow, resolution set to (1984x 116), display flickers. Mouse works, is lock to screen but keyboad does not. L4D2 | Good: Run great on Native resolution (has portal 2 setting, make sure to fix), start Perfect, loading is medium(marked improvement), and causes crashes, controls are broken no keyboard and mouse has issue. --retest Nier: Automata (D3D11 FL11_1) | Works: low fps - retest 960x540 Orb of Creation (D3D11 FL11_1) | Perfect-but unity, menu flashes but using native display it perfect. Need to remeber that unity crashes casue system lockup Portal (D3D9Ex) | Great: medium time to start, run perect (full Native resolution) with capped fps (60), display flickers, and the keyboard does not work. Portal 2 (D3D9Ex) | Perfect: Run great on Native resolution (make sure to fix video setting), start Perfect, loading is good(now), controls are broken no keyboard and mouse has issue. POSTAL 2 | wont start causes system crash Slay the Spire | wont Start: pops up and then closes Star Wars Battlefront 2 classic | Perfect: Starts Perfect, loads are ok(starting campaign is long) (need to test battle mode), mouse is bound to a small box in the center of screen, which make menu navigator difficult. --playtest Stardew Valley (No GPU) | Starts well, Close to playable 445 --retest Your Chronicle (D3D11 FL11_1) | Runs Great, it is CPU heavy, loads slow, use native resolution

Game Total 31 games (2 omited): Perfect: 7 Great: 5 Good: 1 Playable: 1 Low: 3 Bad: 2 (GTA V, Dead by daylight) Wont Start: 6

Controls: Works perfect: 7 keyboard works and mouse work but mouse not bound: 1 Keyboard does not work: 3 Mouse does not work: Neither work: 5

Games that work but controls are unplayable: 5

Drayyzzz commented 8 months ago

Just open the "taskmgr" tab and set Stardew Valley or the game you want as priority. In other words, any option above "normal". I tested this on my cell phone and it resolved it.

Den-Well commented 1 month ago

Native resolution = (2480 x 1116) Steam is more stable at lower resolution (960x540)

Games List for mobox wow64 - wine 91 wow64, by default they all are using dxvk 2.0 async Backppack hero (D3D11 FL11_1) | Nearly Perfect 9/10, need to test native resolution Call of Duty | wont Start Core Keeper (D3D11 FL11_1) | low: have to use not use 960x540 resoltion and it flickers badly. on native i get about 10 fps. Currenlty 5/10 Counter-strike 1.6 (No info) | Runs Perfect, controlls are unplayable Counter-strike source (D3D9Ex) | Runs Great, flickers, controlls are unplayable. I get 50 fps on Native resolution Dark Souls Prepare to Die | low: start well, loads well, mouse and keyboard work, the display (960x540) is just black - Native resolution failed retest with DXVK 1.3 Dead by Daylight | Easy anti cheat caused issue - Due for rebuild Depths of Peril (No info) | Runs great on native resolution, hard to see it a old pc game. Dicey Dungeons (No info)| Runs perfectly but keyboard does not work 10/10 (only need esc key to exit) Dream Engine: Nomad Cities (D3D11 FL11_1) | wont Start: starts well, Unity crash with flickers, total system lockup Morrowind | NA: has an error might be due to openmwn, it has no listed resolutions, must manual fix Skyrim (D3D9) | Works great, 30 fps at native, and ?? at 960x540 (it has no listed resolutions). Issue with mouse not being bound Factorio (D3D11 FL11_1) | At native resolution and 960x540 would not start | before Works well, load is a bit slow, 60 FPS capped 445 FTL: Faster than Light | wont start Garry's mod (D3D9Ex) | pop up and then closes (Native and 960) GTA V | issues with social club, due for rebuild Graveyard Keeper (D3D11 FL11_1) | Runs great, load is a little slow, controll work. but weird display error, where is scrolls off the screen 8/10 Half-Life (No info) | Runs Perfect, keyboard and mouse works, forgot the does not use mouse to look (it uses arrow keys) Half-Life 2 (D3D9Ex) | Playable, but mouse works and keyboard does not. display flickers Hotline Miami | wont Start Iron Grip Warlord | Runs pefectly (it set the display to 1920x1080 ~ 50 fps(I can boost it)), controls are completly busted, keyboard does not work, and mouse is not bound. Just Cause 2 | pop up and then crashes (Native and 960) L4D | Great: Starts, loading is a little slow, resolution set to (1984x 116), display flickers. Mouse works, is lock to screen but keyboad does not. L4D2 | Good: Run great on Native resolution (has portal 2 setting, make sure to fix), start Perfect, loading is medium(marked improvement), and causes crashes, controls are broken no keyboard and mouse has issue. --retest Nier: Automata (D3D11 FL11_1) | Works: low fps - retest 960x540 Orb of Creation (D3D11 FL11_1) | Perfect-but unity, menu flashes but using native display it perfect. Need to remeber that unity crashes casue system lockup Portal (D3D9Ex) | Great: medium time to start, run perect (full Native resolution) with capped fps (60), display flickers, and the keyboard does not work. Portal 2 (D3D9Ex) | Perfect: Run great on Native resolution (make sure to fix video setting), start Perfect, loading is good(now), controls are broken no keyboard and mouse has issue. POSTAL 2 | wont start causes system crash Slay the Spire | wont Start: pops up and then closes Star Wars Battlefront 2 classic | Perfect: Starts Perfect, loads are ok(starting campaign is long) (need to test battle mode), mouse is bound to a small box in the center of screen, which make menu navigator difficult. --playtest Stardew Valley (No GPU) | Starts well, Close to playable 445 --retest Your Chronicle (D3D11 FL11_1) | Runs Great, it is CPU heavy, loads slow, use native resolution

Game Total 31 games (2 omited): Perfect: 7 Great: 5 Good: 1 Playable: 1 Low: 3 Bad: 2 (GTA V, Dead by daylight) Wont Start: 6

Controls: Works perfect: 7 keyboard works and mouse work but mouse not bound: 1 Keyboard does not work: 3 Mouse does not work: Neither work: 5

Games that work but controls are unplayable: 5

How did you managed to make controller to work with Graveyard Keeper? I use a GameSir X2 and only D-pad works.

Jacobw1oo commented 1 month ago

So it been a while since this post. I manage my own Chroot Ubuntu 24.10 named Jakebox (a 1 step extract and run is coming soon). I now have fully supported controllers from android (i use rooted to change permission on controller to make them readable from my Ubuntu system), next i use antimicro if i need to convert from controller inputs to keyboard/mouse inputs.

Lastly, my D-pad is mapped at the android system level to arrow-keys, actually i need to remove this issue.

For more information, my permanent fix is: sudo echo 'KERNEL=="event*", GROUP=="input", OWNER="gamer"' > /lib/udev/rules.d/99-input.rules

tmp fix, have to find out which event is your device, use sudo evtest.

sudo chmod 755 /dev/input/event11

testing

sudo evtest

ls -al /dev/input/

getfacl /dev/input/event*