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