Symbolic keyboard map for XVIC - Italian

You need an actual VIC.

Moderator: Moderators

User avatar
LoadError
Vic 20 Hobbyist
Posts: 120
Joined: Sat Feb 17, 2007 2:44 pm
Website: http://digilander.libero.it/pyrotech/
Location: Italy
Occupation: FG Soft

Symbolic keyboard map for XVIC - Italian

Post by LoadError »

Any chance of finding a working win_sym_it.vkm file to use in VICE XVIC?
The one provided in the X64 folder does not work with XVIC for some reason.
Commodore VIC-20 n. WG-C-275517 - manufactured in Western Germany in 1983
CurtisP
Vic 20 Dabbler
Posts: 99
Joined: Tue Mar 08, 2005 8:24 pm

Re: Symbolic keyboard map for XVIC - Italian

Post by CurtisP »

The reason it doesn't work is because the VIC-20 and C64 use slightly different keyboard matrixes.

Does the C64 one work with x64? If so, it shouldn't be too difficult to convert it to work with xVic.
User avatar
LoadError
Vic 20 Hobbyist
Posts: 120
Joined: Sat Feb 17, 2007 2:44 pm
Website: http://digilander.libero.it/pyrotech/
Location: Italy
Occupation: FG Soft

Re: Symbolic keyboard map for XVIC - Italian

Post by LoadError »

Is this documented anywhere? I guess I'd have to replace the four digit number at the beginning of each directive.

Examples:
2 0 0 8 /* 1 -> 1 */
3 0 7 40 /* 2 -> 2 */

According to the commented lines in the file itself, the syntax is supposed to be this:
- normal line has 'keysym/scancode row column shiftflag'

So in the examples above, the "1" key should be in row 0, column 0, shift flag 8 (which means "can be shifted or not shifted"); the "2" key should be row 0, column 7, and the shift flag 40 does not match any of the documented flags. So definitely something does not add up.
Commodore VIC-20 n. WG-C-275517 - manufactured in Western Germany in 1983
User avatar
orion70
VICtalian
Posts: 4337
Joined: Thu Feb 02, 2006 4:45 am
Location: Piacenza, Italy
Occupation: Biologist

Re: Symbolic keyboard map for XVIC - Italian

Post by orion70 »

I noticed your post in the International section just yesterday, and this post a couple of minutes ago :oops:
I also fiddled with the symbolic IT keyboard matrix for X64, and tried to adapt it into a new win_sym_it.vkm for XVIC, with no success. Looks like I always mess the whole keyboard up, and loose almost all but the alphabet keys (no punctuation etc.). Now, Google wasn't my friend in finding a working sym_IT dor the VIC emulator, so I guess it should be submitted as a request to the VICE team.

At least, in all this mess, I learned how to make my X64 correctly respond to my Italian keyboard. So thanks Loaderror :).

EDIT: a good start could be to "Dump keyset" in the Keyboard menu. It creates a vkm file with the correct VIC matrix, but empty (no assigned keys whatsoever). I am not able to get past this point though.

EDIT2: as I can see here (page in Italian), this is pretty useless, as it dumps the present configuration, i.e., the US symbolic keyboard. The rest between the two "/" symbols is a comment.
User avatar
orion70
VICtalian
Posts: 4337
Joined: Thu Feb 02, 2006 4:45 am
Location: Piacenza, Italy
Occupation: Biologist

Re: Symbolic keyboard map for XVIC - Italian

Post by orion70 »

And here we go, I found this pretty badly shaped keyboard matrix in an archived copy of the VIC Technical Manual. I hope it can be of use, even if it's not so readable (click to enlarge).
Attachments
VIC_key_Martix.jpg
User avatar
srowe
Vic 20 Scientist
Posts: 1325
Joined: Mon Jun 16, 2014 3:19 pm

Re: Symbolic keyboard map for XVIC - Italian

Post by srowe »

Here's a better one from "VIC Revealed"
keymatrix.png
User avatar
LoadError
Vic 20 Hobbyist
Posts: 120
Joined: Sat Feb 17, 2007 2:44 pm
Website: http://digilander.libero.it/pyrotech/
Location: Italy
Occupation: FG Soft

Re: Symbolic keyboard map for XVIC - Italian

Post by LoadError »

I still can't make head or tail about it :oops:
How does this scheme translate to a VICE keymap file?
It's particularly the third code (the shiftflag) that's eluding me.
Commodore VIC-20 n. WG-C-275517 - manufactured in Western Germany in 1983
User avatar
LoadError
Vic 20 Hobbyist
Posts: 120
Joined: Sat Feb 17, 2007 2:44 pm
Website: http://digilander.libero.it/pyrotech/
Location: Italy
Occupation: FG Soft

Re: Symbolic keyboard map for XVIC - Italian

Post by LoadError »

Success! I've got it figured out.
The first thing to understand is that the shift codes are cumulative.
The second thing is that shiftcode "40" means "the key can be shifted" (8) + "another definition for the same key will follow" (32).
With this in mind, I've been able to map the "3" key correctly on an Italian keyboard (unshifted = "3"; shifted = "£").

4 1 0 40
4 6 0 0
42 1 3 2
54 6 4 2

Note that the first number is the sequential number the key appears on the Italian 105 PC keyboard, and that the numbering starts from 1, not from 0, so "3" is the fourth key on the physical keyboard.
The second number is the row in the VIC-20 matrix you posted; the third number is the column.
Note also that the shift code for the "£" is 0 (not "1" as I originally thought) because the shift code means "do you want the VIC-20 key shifted or not?". So if I put "1" there I get the PETSCII character you get on a real VIC when you hit the "£" key with SHIFT.
Finally, note that I had to define keys 42 (left shift) and 54 (right shift) for this to work.
With all this in mind, I'll eventually be able to post the IT sym key file for XVIC, and now you know how to do the trick for any language.
Cheers!
Commodore VIC-20 n. WG-C-275517 - manufactured in Western Germany in 1983
User avatar
LoadError
Vic 20 Hobbyist
Posts: 120
Joined: Sat Feb 17, 2007 2:44 pm
Website: http://digilander.libero.it/pyrotech/
Location: Italy
Occupation: FG Soft

Re: Symbolic keyboard map for XVIC - Italian

Post by LoadError »

And... there you go! Italian fellows, feel free to beta test it :D
I had to make these non intuitive choices:
- the left arrow is mapped to the "\" - "|" key (leftmost on row 1) where it would be on a VIC, as there is no symbolic equivalent in the IT keyboard
- similarly, the up arrow is mapped to "ì"
- since "]" is on the same key as "+" and "*", I chose to have "[" on "è" and "]" on SHIFT + "è"
Enjoy!
Attachments
win_sym_it.zip
(1.65 KiB) Downloaded 273 times
Last edited by LoadError on Tue Feb 20, 2018 2:20 pm, edited 1 time in total.
Commodore VIC-20 n. WG-C-275517 - manufactured in Western Germany in 1983
User avatar
orion70
VICtalian
Posts: 4337
Joined: Thu Feb 02, 2006 4:45 am
Location: Piacenza, Italy
Occupation: Biologist

Re: Symbolic keyboard map for XVIC - Italian

Post by orion70 »

Great job! Thanks to you, Load, I learned how to make typing in x64 easier with an Italian keyboard, and only a few days after you provide a ready-to-go solution for xvic. Thanks a lot for you obstinacy, and for the patience :wink: Maybe you should submit it to the VICE team?

As a sidenote, I guess I'll have to stick to stickers for some keys, such as the special ones, but all in all typing stuff in will be much more intuitive :P
User avatar
LoadError
Vic 20 Hobbyist
Posts: 120
Joined: Sat Feb 17, 2007 2:44 pm
Website: http://digilander.libero.it/pyrotech/
Location: Italy
Occupation: FG Soft

Re: Symbolic keyboard map for XVIC - Italian

Post by LoadError »

Another thing I realized is that whenever you define a symbol you don't need to also define the SHIFTed symbol if it matches the Commodore keyboard.
I.e. you don't have to define SHIFT+1 in the Italian keyboard, as it's "!" both in the Italian keyboard and on the Commodore keyboard. Hence some of the definitions in my file are redundant (but won't hurt).
Same thing goes for all the PETSCII characters.
Commodore VIC-20 n. WG-C-275517 - manufactured in Western Germany in 1983
User avatar
orion70
VICtalian
Posts: 4337
Joined: Thu Feb 02, 2006 4:45 am
Location: Piacenza, Italy
Occupation: Biologist

Re: Symbolic keyboard map for XVIC - Italian

Post by orion70 »

The only downside is, people from all over Europe will ask you to personalize their keyboards :D
groepaz
Vic 20 Scientist
Posts: 1180
Joined: Wed Aug 25, 2010 5:30 pm

Re: Symbolic keyboard map for XVIC - Italian

Post by groepaz »

just let me know when this keymap is "ready", then i can drop it into the vice repo :)
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
User avatar
LoadError
Vic 20 Hobbyist
Posts: 120
Joined: Sat Feb 17, 2007 2:44 pm
Website: http://digilander.libero.it/pyrotech/
Location: Italy
Occupation: FG Soft

Re: Symbolic keyboard map for XVIC - Italian

Post by LoadError »

There are a few issues to figure out before it can be committed to VICE.
1) in some cases I had to define two symbols (one not shifted and one shifted) for keys that, in the Commodore keyboard, have a single symbol and a PETSCII symbol. One such example is the " ' "/" ? " key which is on the right of the " 0 " key in the Italian keyboard. On the Commodore keyboard, the corresponding key is " + " and thus the PETSCII symbol for that key is lost because the shifted key is already assigned to " ? ".
2) in some cases, hitting LEFT CTRL (the Commodore key) + a key results in an unexpected symbol. Example: SHIFT + " 3 " in the Commodore keyboard is " # " but in the Italian keyboard is " £ ". If I press SHIFT + 3 with my layout, I get " £ " but if I hit LEFT CTRL + 3 I get " # " (I expected to get " 3 ").
3) in some cases, I had to assign a symbol that is shifted on the Commodore keyboard, to an unshifted PC key (an example is the " ' " character again). In these cases, if I hit LEFT CTRL + " ' " I get the expected PETSCII character, but I also switch from uppercase to lowercase which is unexpected (the reason is that the " ' " key is shifted on the Commodore keyboard so it's like I was hitting SHIFT + CBM.
These issues would possibly be solved by some VICE expert.

Anyway I've done a few fixes to the IT layout so I reposted it above, as I found a few mistakes. Grab it again if you wish. :)
Commodore VIC-20 n. WG-C-275517 - manufactured in Western Germany in 1983
User avatar
LoadError
Vic 20 Hobbyist
Posts: 120
Joined: Sat Feb 17, 2007 2:44 pm
Website: http://digilander.libero.it/pyrotech/
Location: Italy
Occupation: FG Soft

Re: Symbolic keyboard map for XVIC - Italian

Post by LoadError »

I've decided to map three Commodore keys to unused keys, to solve the problem with the inability to access some PETSCII symbols due to the Italian keyboard layout:

F9 doubles as +
F10 doubles as £
F11 doubles as *

This way you can get the symbolic intuitive key layout and still be able to access the PETSCII symbols by using SHIFT and CTRL with F9/F10/F11.

What do you think?
Commodore VIC-20 n. WG-C-275517 - manufactured in Western Germany in 1983
Post Reply