|
|
@ -242,18 +242,17 @@ |
|
|
|
(path bind > key) |
|
|
|
(path key-states > this-frame-states) |
|
|
|
(path key-states > last-frame-states)) |
|
|
|
(cond |
|
|
|
((bit-and (path bind > modifier-flags) keybind-modifier-flags-ctrl) |
|
|
|
(return (or (at SDL_SCANCODE_LCTRL (path key-states > this-frame-states)) |
|
|
|
(at SDL_SCANCODE_RCTRL (path key-states > this-frame-states))))) |
|
|
|
((bit-and (path bind > modifier-flags) keybind-modifier-flags-shift) |
|
|
|
(return (or (at SDL_SCANCODE_LSHIFT (path key-states > this-frame-states)) |
|
|
|
(at SDL_SCANCODE_RSHIFT (path key-states > this-frame-states))))) |
|
|
|
((bit-and (path bind > modifier-flags) keybind-modifier-flags-alt) |
|
|
|
(return (or (at SDL_SCANCODE_LALT (path key-states > this-frame-states)) |
|
|
|
(at SDL_SCANCODE_RALT (path key-states > this-frame-states))))) |
|
|
|
(true |
|
|
|
(return true))))) |
|
|
|
(var modifier-state (unsigned int) 0) |
|
|
|
(when (or (at SDL_SCANCODE_LCTRL (path key-states > this-frame-states)) |
|
|
|
(at SDL_SCANCODE_RCTRL (path key-states > this-frame-states))) |
|
|
|
(set modifier-state (bit-or modifier-state keybind-modifier-flags-ctrl))) |
|
|
|
(when (or (at SDL_SCANCODE_LSHIFT (path key-states > this-frame-states)) |
|
|
|
(at SDL_SCANCODE_RSHIFT (path key-states > this-frame-states))) |
|
|
|
(set modifier-state (bit-or modifier-state keybind-modifier-flags-shift))) |
|
|
|
(when (or (at SDL_SCANCODE_LALT (path key-states > this-frame-states)) |
|
|
|
(at SDL_SCANCODE_RALT (path key-states > this-frame-states))) |
|
|
|
(set modifier-state (bit-or modifier-state keybind-modifier-flags-alt))) |
|
|
|
(return (= modifier-state (path bind > modifier-flags))))) |
|
|
|
(return false)) |
|
|
|
|
|
|
|
(defun-local append-to-string-buffer (buffer-out (* char) buffer-size size_t write-head (* (* char)) |
|
|
|