Browse Source

replaced antimicro with qjoypad

master
mortie 3 years ago
parent
commit
5570dcd077
4 changed files with 20 additions and 125 deletions
  1. 0
    114
      scripts/keymap.joystick.amgp
  2. 3
    11
      scripts/keymap.sh
  3. 15
    0
      scripts/snes.lyt
  4. 2
    0
      server.js

+ 0
- 114
scripts/keymap.joystick.amgp View File

@@ -1,114 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<joystick configversion="19" appversion="2.23">
<!--The SDL name for a joystick is included for informational purposes only.-->
<sdlname>usb gamepad </sdlname>
<!--The GUID for a joystick is included for informational purposes only.-->
<guid>030000001008000001e5000010010000</guid>
<sets>
<set index="1">
<axis index="1">
<throttle>normal</throttle>
<axisbutton index="1">
<slots>
<slot>
<code>0x1000012</code>
<mode>keyboard</mode>
</slot>
</slots>
</axisbutton>
<axisbutton index="2">
<slots>
<slot>
<code>0x1000014</code>
<mode>keyboard</mode>
</slot>
</slots>
</axisbutton>
</axis>
<axis index="2">
<maxZone>32737</maxZone>
<throttle>normal</throttle>
<axisbutton index="1">
<slots>
<slot>
<code>0x1000013</code>
<mode>keyboard</mode>
</slot>
</slots>
</axisbutton>
<axisbutton index="2">
<slots>
<slot>
<code>0x1000015</code>
<mode>keyboard</mode>
</slot>
</slots>
</axisbutton>
</axis>
<button index="1">
<slots>
<slot>
<code>0x58</code>
<mode>keyboard</mode>
</slot>
</slots>
</button>
<button index="2">
<slots>
<slot>
<code>0x1000004</code>
<mode>keyboard</mode>
</slot>
</slots>
</button>
<button index="3">
<slots>
<slot>
<code>0x1000003</code>
<mode>keyboard</mode>
</slot>
</slots>
</button>
<button index="4">
<slots>
<slot>
<code>0x59</code>
<mode>keyboard</mode>
</slot>
</slots>
</button>
<button index="5">
<slots>
<slot>
<code>0x1000016</code>
<mode>keyboard</mode>
</slot>
</slots>
</button>
<button index="6">
<slots>
<slot>
<code>0x1000017</code>
<mode>keyboard</mode>
</slot>
</slots>
</button>
<button index="9">
<slots>
<slot>
<code>0x1000001</code>
<mode>keyboard</mode>
</slot>
</slots>
</button>
<button index="10">
<slots>
<slot>
<code>0x1000000</code>
<mode>keyboard</mode>
</slot>
</slots>
</button>
</set>
</sets>
</joystick>

+ 3
- 11
scripts/keymap.sh View File

@@ -1,13 +1,5 @@
#!/bin/sh

# Left/Up/Down/Right: left/up/down/right
# A: Enter
# B: Backspace
# X: X
# Y: Y
# Start: T
# Select: E
# LBumper: PgUp
# RBumper: PgDn
dir=$(dirname "$0")
antimicro --hidden "$dir/keymap.joystick.amgp"
mkdir -p ~/.qjoypad
cp "$(dirname $0)/snes.lyt" ~/.qjoypad/snes.lyt
qjoypad snes

+ 15
- 0
scripts/snes.lyt View File

@@ -0,0 +1,15 @@
# QJoyPad 4.3 Layout File

Joystick 1 {
Axis 1: +key 114, -key 113
Axis 2: +key 116, -key 111
Button 1: key 56
Button 2: key 38
Button 3: key 57
Button 4: key 28
Button 5: key 33
Button 6: key 32
Button 9: key 22
Button 10: key 36
}


+ 2
- 0
server.js View File

@@ -32,6 +32,8 @@ function updateGames() {
}
}

shell.safe("./scripts/keymap.sh");

var driveMounted = false;
async function onblock(evt) {
if (evt.DEVTYPE !== "partition")

Loading…
Cancel
Save