Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Detecting keypresses

A topic by Millie Squilly created Jul 05, 2023 Views: 212 Replies: 4
Viewing posts 1 to 2
(+2)

Hi,

Just checking based on my reading of the doco, is the only way to capture a keypress event in Decker essentially either using the navigate event on the card (which can only grab the arrow keys) or the change event on a field (which is debounced to one second and therefore may not be the best for precise input)? Just want to make sure I'm not missing anything.

Developer(+1)

That's correct. As noted in this old thread, Decker avoids exposing raw keyboard input (so far) because programs which depended upon it would be unusable on devices like phones and tablets which do not have a physical keyboard.

In the future maybe some compromise is possible, like allowing button widgets to be annotated to trigger when a keyboard key "shortcut" is pressed, but I'd need to give it some careful thought.

(+2)

Thanks! Just wanted to make sure I wasn't missing something!

Developer

Followup: decker v1.23 provides another, somewhat more flexible option for keyboard input: buttons can be assigned "shortcut keys". I think this feature could make your synthesizer even better on devices that have a keyboard!

(+1)

Nice! I guess I'll have to put a version 3 out, haha