mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 02:38:53 +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 ||
|
||||
keyCodeToKeyEdge[code] == KeyDown ||
|
||||
keyCodeToKeyEdge[code] == KeyLeft ||
|
||||
keyCodeToKeyEdge[code] == KeyRight {
|
||||
keyCodeToKeyEdge[code] == KeyRight ||
|
||||
keyCodeToKeyEdge[code] == KeyBackspace ||
|
||||
keyCodeToKeyEdge[code] == KeyTab {
|
||||
e.Call("preventDefault")
|
||||
}
|
||||
currentInput.keyDownEdge(code)
|
||||
@ -260,7 +262,9 @@ func initialize() error {
|
||||
if cs == keyToCodes[KeyUp][0] ||
|
||||
cs == keyToCodes[KeyDown][0] ||
|
||||
cs == keyToCodes[KeyLeft][0] ||
|
||||
cs == keyToCodes[KeyRight][0] {
|
||||
cs == keyToCodes[KeyRight][0] ||
|
||||
cs == keyToCodes[KeyBackspace][0] ||
|
||||
cs == keyToCodes[KeyTab][0] {
|
||||
e.Call("preventDefault")
|
||||
}
|
||||
currentInput.keyDown(cs)
|
||||
|
Loading…
Reference in New Issue
Block a user