nurpax / petmate

PETSCII editor with Electron/React/Redux
MIT License
178 stars 14 forks source link

BUG: Text Entry put wrong Characters down. #194

Open wbochar opened 3 years ago

wbochar commented 3 years ago

Use the Text tool, enter 1234567890, then enter directly below it the shifted versions SHIFT+1234567890 Shift 6 has no char, Shift 7 has the ampersand "&" sign

Shift 6 should be Ampersand & Shift 7 should single quote '

nurpax commented 3 years ago

I'm not sure how you expect it to work, or if I can't just reproduce.

The way the code is written, is that ASCII characters from the host PC are converted to PETSCII when it makes sense. So if I type an ampersand & (shift-7 on US layout, shift-6 on FI keyboard), it will convert it to C64 keycode $26. So it tries to match what you're typing on the PC. These are probably not quite the same on a real C64 keyboard.

Conversion for single quotes was missing though and I added that now.

franticht commented 2 years ago

Since most C64 PETSCII editors offer the possibility to "draw" PETSCII precisely through typing on the keyboard (instead of having to select the char you want with the mouse and then click somewhere to put it down), it would make a whole lot of sense to offer an alternate keyboard drawing mode which allows the user to write as if it was a C64 keyboard (corresponding to positional keyboard mapping in VICE). PETSCII maniacs used to C64 editors know by heart where most PETSCII characters "should be" on the keyboard.

In fact, the lack of such an input mode is the only reason for why I wouldn't actually use petmate in its current form. Otherwise it is a nice and clean editor! (Took me a little while to figure out how to grab a new brush after the first one is grabbed though. I tried right-clicking on the icon and so on. I didn't expect to be required to use the keyboard to achieve this, since most other aspects of the program seems primarily mouse based.)