mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
Add backspace (not tested)
This commit is contained in:
parent
62d1395670
commit
9f40da41fc
@ -55,6 +55,8 @@ func init() {
|
||||
0x27: "Right",
|
||||
0x26: "Up",
|
||||
0x1B: "Escape",
|
||||
// The keys not listed in the Mozilla site:
|
||||
0x08: "Backspace",
|
||||
}
|
||||
// ASCII: 0 - 9
|
||||
for c := '0'; c <= '9'; c++ {
|
||||
|
@ -53,6 +53,7 @@ const (
|
||||
KeyX
|
||||
KeyY
|
||||
KeyZ
|
||||
KeyBackspace
|
||||
KeyCapsLock
|
||||
KeyComma
|
||||
KeyDelete
|
||||
|
@ -57,6 +57,7 @@ var glfwKeyCodeToKey = map[glfw.Key]Key{
|
||||
glfw.KeyX: KeyX,
|
||||
glfw.KeyY: KeyY,
|
||||
glfw.KeyZ: KeyZ,
|
||||
glfw.KeyBackspace: KeyBackspace,
|
||||
glfw.KeyCapsLock: KeyCapsLock,
|
||||
glfw.KeyComma: KeyComma,
|
||||
glfw.KeyDelete: KeyDelete,
|
||||
|
@ -17,6 +17,7 @@
|
||||
package ui
|
||||
|
||||
var keyCodeToKey = map[int]Key{
|
||||
8: KeyBackspace,
|
||||
9: KeyTab,
|
||||
13: KeyEnter,
|
||||
16: KeyLeftShift,
|
||||
|
Loading…
Reference in New Issue
Block a user