mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-12 03:58:55 +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 {
|
switch key {
|
||||||
case KeyAlt:
|
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:
|
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:
|
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:
|
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:
|
default:
|
||||||
return i.state.KeyPressed[ui.Key(key)]
|
return i.state.KeyPressed[ui.Key(key)]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user