mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
parent
78285c3916
commit
d80f1112ed
8
input.go
8
input.go
@ -405,13 +405,13 @@ func (i *inputState) isKeyPressed(key Key) bool {
|
||||
|
||||
switch key {
|
||||
case KeyAlt:
|
||||
return i.state.KeyPressed[ui.KeyAltLeft] && i.state.KeyPressed[ui.KeyAltRight]
|
||||
return i.state.KeyPressed[ui.KeyAltLeft] || i.state.KeyPressed[ui.KeyAltRight]
|
||||
case KeyControl:
|
||||
return i.state.KeyPressed[ui.KeyControlLeft] && i.state.KeyPressed[ui.KeyControlRight]
|
||||
return i.state.KeyPressed[ui.KeyControlLeft] || i.state.KeyPressed[ui.KeyControlRight]
|
||||
case KeyShift:
|
||||
return i.state.KeyPressed[ui.KeyShiftLeft] && i.state.KeyPressed[ui.KeyShiftRight]
|
||||
return i.state.KeyPressed[ui.KeyShiftLeft] || i.state.KeyPressed[ui.KeyShiftRight]
|
||||
case KeyMeta:
|
||||
return i.state.KeyPressed[ui.KeyMetaLeft] && i.state.KeyPressed[ui.KeyMetaRight]
|
||||
return i.state.KeyPressed[ui.KeyMetaLeft] || i.state.KeyPressed[ui.KeyMetaRight]
|
||||
default:
|
||||
return i.state.KeyPressed[ui.Key(key)]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user