langel / vixxen20

Commodore VIC 20 simulation environment
Other
8 stars 2 forks source link

handle shifted characters for key.input #56

Closed argarak closed 3 years ago

argarak commented 3 years ago

this closes #55 my bad for not handling shifted characters, maybe i was expecting everything to be handled using shift/meta boolean states and keycodes, this bug slipped under my radar. this should correctly throw shifted letter characters, shift symbols for all number keys and shifted punctuation keys.

for shifting punctuation, i added another property to the lookup table called shiftKey, which describes the character used when the specific key is shifted. a lookup table is still required here, otherwise there would be a weird discrepancy between the non-shifted and shifted characters, keeping in mind that dvorak (and therefore other layouts) has some punctuation/symbol keys where letter keys are normally on a standard US qwerty layout.

make sure to test! i think i've tested all the key commands, at least the ones that don't interfere with my window manager shortcuts