Playground Keyboard Support #4

Open
opened 2024-11-26 20:01:57 +00:00 by yumaikas · 0 comments
Owner

Drafting up an attempt at keyboard support for the playground, on the Vera side:

The primitive, I think, at least for game-style programs (actively rendering and polling state), should be a set of counters as below:

Key a is pressed
Key b is pressed
...
Key shift is pressed
Key space is pressed

Then, edge-triggered behaviors can be handled like so

| check key a, Key a is pressed, Key a was pressed | 
    Key a is pressed, Key a was pressed
| check key a, Key a is pressed | 
    Key a was pressed, Key a was just pressed
| check key a, Key a was pressed | 
    Key a was released
Drafting up an attempt at keyboard support for the playground, on the Vera side: The primitive, I think, at least for game-style programs (actively rendering and polling state), should be a set of counters as below: ``` Key a is pressed Key b is pressed ... Key shift is pressed Key space is pressed ``` Then, edge-triggered behaviors can be handled like so ``` | check key a, Key a is pressed, Key a was pressed | Key a is pressed, Key a was pressed | check key a, Key a is pressed | Key a was pressed, Key a was just pressed | check key a, Key a was pressed | Key a was released ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: vera/nova-rust#4
No description provided.