Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyboards: Add keyboard keys as a valid feature type #19

Merged
merged 8 commits into from
Jan 16, 2018
157 changes: 157 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,163 @@ The following feature types are available:
* `abspointer`
* `wheel`
* `throttle`
* `key`

#### Buttons

Buttons must provide a `type` attribute to specify analog or digital input.

#### Keys

Keys must provide a `symbol` attribute to facilitate keyboard mapping. Symbols are hardware-independent virtual key representations. The following symbols are used:

##### ASCII keys

Symbol | Character | ASCII value
--- | --- | ---
backspace | | 8
tab | | 9
clear | | 12
return | | 13
pause | | 19
escape | | 27
space | | 32
exclaim | ! | 33
doublequote | " | 34
hash | # | 35
dollar | $ | 36
ampersand | & | 38
quote | ' | 39
leftparen | ( | 40
rightparen | ) | 41
asterisk | * | 42
plus | + | 43
comma | , | 44
minus | - | 45
period | . | 46
slash | / | 47
0 | 0 | 48
1 | 1 | 49
2 | 2 | 50
3 | 3 | 51
4 | 4 | 52
5 | 5 | 53
6 | 6 | 54
7 | 7 | 55
8 | 8 | 56
9 | 9 | 57
colon | : | 58
semicolon | ; | 59
less | < | 60
equals | = | 61
greater | > | 62
question | ? | 63
at | @ | 64
leftbracket | [ | 91
backslash | \ | 92
rightbracket | ] | 93
caret | ^ | 94
underscore | _ | 95
grave | ` | 96
a | a | 97
b | b | 98
c | c | 99
d | d | 100
e | e | 101
f | f | 102
g | g | 103
h | h | 104
i | i | 105
j | j | 106
k | k | 107
l | l | 108
m | m | 109
n | n | 110
o | o | 111
p | p | 112
q | q | 113
r | r | 114
s | s | 115
t | t | 116
u | u | 117
v | v | 118
w | w | 119
x | x | 120
y | y | 121
z | z | 122
leftbrace | [ | 123
bar | \| | 124
rightbrace | ] | 125
tilde | ~ | 126
delete | | 127

##### Symbols without ASCII characters
Symbol | Comment
--- | ---
kp0 | Numpad 0
kp1 | Numpad 1
kp2 | Numpad 2
kp3 | Numpad 3
kp4 | Numpad 4
kp5 | Numpad 5
kp6 | Numpad 6
kp7 | Numpad 7
kp8 | Numpad 8
kp9 | Numpad 9
kpperiod | Numpad .
kpdivide | Numpad /
kpmultiply | Numpad *
kpminus | Numpad -
kpplus | Numpad +
kpenter | Numpad Enter
kpequals | Numpad =
up |
down |
right |
left |
insert |
home |
end |
pageup |
pagedown |
f1 |
f2 |
f3 |
f4 |
f5 |
f6 |
f7 |
f8 |
f9 |
f10 |
f11 |
f12 |
f13 |
f14 |
f15 |
numlock |
capslock |
scrollock |
leftshift |
rightshift |
leftctrl |
rightctrl |
leftalt |
rightalt |
leftmeta |
rightmeta |
leftsuper | Left "Windows" key
rightsuper | Right "Windows" key
mode | "Alt Gr" key
compose | Multi-key compose key
help |
print |
sysreq |
break |
menu |
power | Power Macintosh power key
euro | Some European keyboards
undo | Atari keyboard has Undo

## strings.po

Expand Down
148 changes: 74 additions & 74 deletions addons/game.controller.amstrad.keyboard/resources/layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,79 +2,79 @@
<layout label="30000" image="layout.png">
<category name="keys" label="35167">
<!-- International key mappings -->
<button name="1" type="digital" label="30001"/>
<button name="2" type="digital" label="30002"/>
<button name="3" type="digital" label="30003"/>
<button name="4" type="digital" label="30004"/>
<button name="5" type="digital" label="30005"/>
<button name="6" type="digital" label="30006"/>
<button name="7" type="digital" label="30007"/>
<button name="8" type="digital" label="30008"/>
<button name="9" type="digital" label="30009"/>
<button name="0" type="digital" label="30010"/>
<button name="a" type="digital" label="30011"/>
<button name="b" type="digital" label="30012"/>
<button name="c" type="digital" label="30013"/>
<button name="d" type="digital" label="30014"/>
<button name="e" type="digital" label="30015"/>
<button name="f" type="digital" label="30016"/>
<button name="g" type="digital" label="30017"/>
<button name="h" type="digital" label="30018"/>
<button name="i" type="digital" label="30019"/>
<button name="j" type="digital" label="30020"/>
<button name="k" type="digital" label="30021"/>
<button name="l" type="digital" label="30022"/>
<button name="m" type="digital" label="30023"/>
<button name="n" type="digital" label="30024"/>
<button name="o" type="digital" label="30025"/>
<button name="p" type="digital" label="30026"/>
<button name="q" type="digital" label="30027"/>
<button name="r" type="digital" label="30028"/>
<button name="s" type="digital" label="30029"/>
<button name="t" type="digital" label="30030"/>
<button name="u" type="digital" label="30031"/>
<button name="v" type="digital" label="30032"/>
<button name="w" type="digital" label="30033"/>
<button name="x" type="digital" label="30034"/>
<button name="y" type="digital" label="30035"/>
<button name="z" type="digital" label="30036"/>
<button name="space" type="digital" label="30037"/>
<button name="comma" type="digital" label="30038"/>
<button name="period" type="digital" label="30039"/>
<button name="semicolon" type="digital" label="30040"/>
<button name="minus" type="digital" label="30041"/>
<button name="equals" type="digital" label="30042"/>
<button name="at" type="digital" label="30043"/>
<button name="openbracket" type="digital" label="30044"/>
<button name="tab" type="digital" label="30045"/>
<button name="return" type="digital" label="30046"/>
<button name="backspace" type="digital" label="30047"/>
<button name="esc" type="digital" label="30048"/>
<button name="up" type="digital" label="30049"/>
<button name="right" type="digital" label="30050"/>
<button name="down" type="digital" label="30051"/>
<button name="left" type="digital" label="30052"/>
<button name="num0" type="digital" label="30053"/>
<button name="num1" type="digital" label="30054"/>
<button name="num2" type="digital" label="30055"/>
<button name="num3" type="digital" label="30056"/>
<button name="num4" type="digital" label="30057"/>
<button name="num5" type="digital" label="30058"/>
<button name="num6" type="digital" label="30059"/>
<button name="num7" type="digital" label="30060"/>
<button name="num8" type="digital" label="30061"/>
<button name="num9" type="digital" label="30062"/>
<button name="numperiod" type="digital" label="30063"/>
<button name="shift" type="digital" label="30064"/>
<button name="ctrl" type="digital" label="30065"/>
<button name="capslock" type="digital" label="30066"/>
<button name="numenter" type="digital" label="30067"/>
<button name="delete" type="digital" label="30068"/>
<button name="end" type="digital" label="30069"/>
<button name="pageup" type="digital" label="30070"/>
<button name="pagedown" type="digital" label="30071"/>
<button name="ins" type="digital" label="30072"/>
<button name="home" type="digital" label="30073"/>
<button name="copy" type="digital" label="30074"/>
<key name="1" symbol="1" label="30001"/>
<key name="2" symbol="2" label="30002"/>
<key name="3" symbol="3" label="30003"/>
<key name="4" symbol="4" label="30004"/>
<key name="5" symbol="5" label="30005"/>
<key name="6" symbol="6" label="30006"/>
<key name="7" symbol="7" label="30007"/>
<key name="8" symbol="8" label="30008"/>
<key name="9" symbol="9" label="30009"/>
<key name="0" symbol="0" label="30010"/>
<key name="a" symbol="a" label="30011"/>
<key name="b" symbol="b" label="30012"/>
<key name="c" symbol="c" label="30013"/>
<key name="d" symbol="d" label="30014"/>
<key name="e" symbol="e" label="30015"/>
<key name="f" symbol="f" label="30016"/>
<key name="g" symbol="g" label="30017"/>
<key name="h" symbol="h" label="30018"/>
<key name="i" symbol="i" label="30019"/>
<key name="j" symbol="j" label="30020"/>
<key name="k" symbol="k" label="30021"/>
<key name="l" symbol="l" label="30022"/>
<key name="m" symbol="m" label="30023"/>
<key name="n" symbol="n" label="30024"/>
<key name="o" symbol="o" label="30025"/>
<key name="p" symbol="p" label="30026"/>
<key name="q" symbol="q" label="30027"/>
<key name="r" symbol="r" label="30028"/>
<key name="s" symbol="s" label="30029"/>
<key name="t" symbol="t" label="30030"/>
<key name="u" symbol="u" label="30031"/>
<key name="v" symbol="v" label="30032"/>
<key name="w" symbol="w" label="30033"/>
<key name="x" symbol="x" label="30034"/>
<key name="y" symbol="y" label="30035"/>
<key name="z" symbol="z" label="30036"/>
<key name="space" symbol="space" label="30037"/>
<key name="comma" symbol="comma" label="30038"/>
<key name="period" symbol="period" label="30039"/>
<key name="semicolon" symbol="semicolon" label="30040"/>
<key name="minus" symbol="minus" label="30041"/>
<key name="equals" symbol="equals" label="30042"/>
<key name="at" symbol="at" label="30043"/>
<key name="openbracket" symbol="leftbracket" label="30044"/>
<key name="tab" symbol="tab" label="30045"/>
<key name="return" symbol="return" label="30046"/>
<key name="backspace" symbol="backspace" label="30047"/>
<key name="esc" symbol="escape" label="30048"/>
<key name="up" symbol="up" label="30049"/>
<key name="right" symbol="right" label="30050"/>
<key name="down" symbol="down" label="30051"/>
<key name="left" symbol="left" label="30052"/>
<key name="num0" symbol="kp0" label="30053"/>
<key name="num1" symbol="kp1" label="30054"/>
<key name="num2" symbol="kp2" label="30055"/>
<key name="num3" symbol="kp3" label="30056"/>
<key name="num4" symbol="kp4" label="30057"/>
<key name="num5" symbol="kp5" label="30058"/>
<key name="num6" symbol="kp6" label="30059"/>
<key name="num7" symbol="kp7" label="30060"/>
<key name="num8" symbol="kp8" label="30061"/>
<key name="num9" symbol="kp9" label="30062"/>
<key name="numperiod" symbol="kpperiod" label="30063"/>
<key name="shift" symbol="leftshift" label="30064"/>
<key name="ctrl" symbol="leftctrl" label="30065"/>
<key name="capslock" symbol="capslock" label="30066"/>
<key name="numenter" symbol="kpenter" label="30067"/>
<key name="delete" symbol="delete" label="30068"/>
<key name="end" symbol="end" label="30069"/>
<key name="pageup" symbol="pageup" label="30070"/>
<key name="pagedown" symbol="pagedown" label="30071"/>
<key name="ins" symbol="insert" label="30072"/>
<key name="home" symbol="home" label="30073"/>
<key name="copy" symbol="leftalt" label="30074"/>
</category>
</layout>
2 changes: 1 addition & 1 deletion addons/game.controller.keyboard/addon.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="game.controller.keyboard"
name="IMB Model M Keyboard"
version="1.1.0"
version="1.1.1"
provider-name="Team Kodi">
<requires>
</requires>
Expand Down
Loading