mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
ebiten: add missing backward compatibility Add key (#2024)
Closes #2025
This commit is contained in:
parent
6443af6401
commit
b1c235145b
@ -375,6 +375,7 @@ func init() {
|
||||
"KP7": "Numpad7",
|
||||
"KP8": "Numpad8",
|
||||
"KP9": "Numpad9",
|
||||
"KPAdd": "NumpadAdd",
|
||||
"KPDecimal": "NumpadDecimal",
|
||||
"KPDivide": "NumpadDivide",
|
||||
"KPMultiply": "NumpadMultiply",
|
||||
|
3
keys.go
3
keys.go
@ -165,6 +165,7 @@ const (
|
||||
KeyKP7 Key = Key(driver.KeyNumpad7)
|
||||
KeyKP8 Key = Key(driver.KeyNumpad8)
|
||||
KeyKP9 Key = Key(driver.KeyNumpad9)
|
||||
KeyKPAdd Key = Key(driver.KeyNumpadAdd)
|
||||
KeyKPDecimal Key = Key(driver.KeyNumpadDecimal)
|
||||
KeyKPDivide Key = Key(driver.KeyNumpadDivide)
|
||||
KeyKPEnter Key = Key(driver.KeyNumpadEnter)
|
||||
@ -826,6 +827,8 @@ func keyNameToKeyCode(name string) (Key, bool) {
|
||||
return KeyKP8, true
|
||||
case "kp9":
|
||||
return KeyKP9, true
|
||||
case "kpadd":
|
||||
return KeyKPAdd, true
|
||||
case "kpdecimal":
|
||||
return KeyKPDecimal, true
|
||||
case "kpdivide":
|
||||
|
Loading…
Reference in New Issue
Block a user