mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
ui: Add more keys not for charCode
This commit is contained in:
parent
fb8bef99c3
commit
4b83a060fe
@ -250,7 +250,9 @@ func initialize() error {
|
|||||||
if keyCodeToKeyEdge[code] == KeyUp ||
|
if keyCodeToKeyEdge[code] == KeyUp ||
|
||||||
keyCodeToKeyEdge[code] == KeyDown ||
|
keyCodeToKeyEdge[code] == KeyDown ||
|
||||||
keyCodeToKeyEdge[code] == KeyLeft ||
|
keyCodeToKeyEdge[code] == KeyLeft ||
|
||||||
keyCodeToKeyEdge[code] == KeyRight {
|
keyCodeToKeyEdge[code] == KeyRight ||
|
||||||
|
keyCodeToKeyEdge[code] == KeyBackspace ||
|
||||||
|
keyCodeToKeyEdge[code] == KeyTab {
|
||||||
e.Call("preventDefault")
|
e.Call("preventDefault")
|
||||||
}
|
}
|
||||||
currentInput.keyDownEdge(code)
|
currentInput.keyDownEdge(code)
|
||||||
@ -260,7 +262,9 @@ func initialize() error {
|
|||||||
if cs == keyToCodes[KeyUp][0] ||
|
if cs == keyToCodes[KeyUp][0] ||
|
||||||
cs == keyToCodes[KeyDown][0] ||
|
cs == keyToCodes[KeyDown][0] ||
|
||||||
cs == keyToCodes[KeyLeft][0] ||
|
cs == keyToCodes[KeyLeft][0] ||
|
||||||
cs == keyToCodes[KeyRight][0] {
|
cs == keyToCodes[KeyRight][0] ||
|
||||||
|
cs == keyToCodes[KeyBackspace][0] ||
|
||||||
|
cs == keyToCodes[KeyTab][0] {
|
||||||
e.Call("preventDefault")
|
e.Call("preventDefault")
|
||||||
}
|
}
|
||||||
currentInput.keyDown(cs)
|
currentInput.keyDown(cs)
|
||||||
|
Loading…
Reference in New Issue
Block a user