ebiten: add missing backward compatibility Add key (#2024)

Closes #2025
This commit is contained in:
Kacper Drobny 2022-03-23 18:41:24 +01:00 committed by Hajime Hoshi
parent 6443af6401
commit b1c235145b
2 changed files with 4 additions and 0 deletions

View File

@ -375,6 +375,7 @@ func init() {
"KP7": "Numpad7",
"KP8": "Numpad8",
"KP9": "Numpad9",
"KPAdd": "NumpadAdd",
"KPDecimal": "NumpadDecimal",
"KPDivide": "NumpadDivide",
"KPMultiply": "NumpadMultiply",

View File

@ -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":