PaulStoffregen / PS2Keyboard

PS/2 Keyboard Library for Arduino
http://www.pjrc.com/teensy/td_libs_PS2Keyboard.html
151 stars 57 forks source link

Italian keyboard layout #12

Closed alejho closed 6 years ago

alejho commented 6 years ago

Hi! Thank you for sharing this library, I used it for a small project and I added the layout for my italian PS2 keyboard. I would be happy to share it! Ciao!

kervinck commented 6 years ago

Hello, I came across this commit and I hope you don't mind me inquiring about this here. Correct me if I'm wrong, but two ASCII codes seem missing in the Italian table:

decimal 80 (capital letter 'P') decimal 96 (backquote or accent grave '`')

I can figure out where capital-P should go (at the zero between PS2_c_CEDILLA and '?'), but I'm at a loss where the backquote or accent grave should be.

alejho commented 6 years ago

Hi, yes, I forgot somehow the 'P' in the place you figured out...I'm sorry, thank you for the feedback (are you going to fix it?) For the backquote...it doesn't exists in the italian keyboard layout (same thing for ~ or {}...we do this symbols with weird Keys combo). Ciao!

On Mon, Aug 6, 2018 at 2:25 PM, Marcel van Kervinck < notifications@github.com> wrote:

Hello, I came across this commit and I hope you don't mind me inquiring about this here. Correct me if 'm wrong, but two ASCII codes seem missing in the Italian table:

decimal 80 (capital letter P) decimal 96 (backquote or accent grave)

I can figure out where capital-P should go (at the zero between PS2_c_CEDILLA and '?'), but I'm at a loss where the backquote (or "accent grave" should be.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/PaulStoffregen/PS2Keyboard/pull/12#issuecomment-410690372, or mute the thread https://github.com/notifications/unsubscribe-auth/AQFSQtjcXkI1ikiZKcyzG27GWNR_fpwfks5uODW6gaJpZM4RNnA3 .

kervinck commented 6 years ago

Thanks for elaborating. Actually I'm not using the library myself at this moment due to some other requirements I have in my project. I therefore completely rewrote it, also representing the tables in a completely different manner. I just noted the missing characters in the cross-check. I don't own an Italian keyboard either, so I wouldn't dare to propose a pull-request on something I know nothing about.

My project is here BTW, it is a keyboard adapter for my TTL computer kit. https://github.com/kervinck/gigatron-rom/commit/cf900929554ffdcd874a716075ef8bd2fbf37c36

I did implement a suggestion for ~ and ` that I found here: https://github.com/ilpianista/itlinux-win-keyboard

AltGr + ' types ` AltGr + ì types ~

Your table seems to use the last one for ~ as well. You could adopt the first and make the Arduino lib complete.

For now I've kept your assignment for '{' and '}'. (The '7' and '0' keys with AltGr if I'm not mistaken, German keyboards also do that). But I also see people map them to 'è[' and '+]' for the Italian layout (Windows?). One suggestion is to accept both mappings, as there seems no conflict.

What's your thought on those? Is there some kind of "standard" for these weird keys that Italian programmers think is "best" or expect? (I will also inquire with my own users of course)

PaulStoffregen commented 6 years ago

I don't have one of these keyboards, so I'm depending on good pull requests.

alejho commented 6 years ago

Actually on my (italian) keyboard:

ALT code 96 for: `

ALT code 126 for: ~

ALTGr Shift è for: {

ALTGr Shift + for: }

At the moment I don't have a ps2 keyboard to make some tests but as soon as possible I will add the missing "P", and fix some errors now I see in the "whit altgr" section of the keymap. Ciao!

On Tue, Aug 7, 2018 at 8:51 PM, Paul Stoffregen notifications@github.com wrote:

I don't have one of these keyboards, so I'm depending on good pull requests.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/PaulStoffregen/PS2Keyboard/pull/12#issuecomment-411162757, or mute the thread https://github.com/notifications/unsubscribe-auth/AQFSQo8c0nklUrPBcD8m0I1LgT-1QcVFks5uOeHAgaJpZM4RNnA3 .

alejho commented 6 years ago

I finally figured out that the italian keyboard layout has some difference depending on the system you're using it:

http://www.giacobbe85.altervista.org/down/info/Guide/Simboli_speciali_sulla_tastiera_italiana.php

so when you want to create a "keyboard map" you also have to decide wich system you want to represent!

Il mer 8 ago 2018, 17:41 Alessio Villa asvilla83@gmail.com ha scritto:

Actually on my (italian) keyboard:

ALT code 96 for: `

ALT code 126 for: ~

ALTGr Shift è for: {

ALTGr Shift + for: }

At the moment I don't have a ps2 keyboard to make some tests but as soon as possible I will add the missing "P", and fix some errors now I see in the "whit altgr" section of the keymap. Ciao!

On Tue, Aug 7, 2018 at 8:51 PM, Paul Stoffregen notifications@github.com wrote:

I don't have one of these keyboards, so I'm depending on good pull requests.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/PaulStoffregen/PS2Keyboard/pull/12#issuecomment-411162757, or mute the thread https://github.com/notifications/unsubscribe-auth/AQFSQo8c0nklUrPBcD8m0I1LgT-1QcVFks5uOeHAgaJpZM4RNnA3 .

kervinck commented 6 years ago

I this Googled a lot, and I get the impression there are two types defined in Windows (which I also don't have):

http://kbdlayout.info/00000410/ "Italian" http://kbdlayout.info/00010410/ "Italian 142"

They indeed differ in the location of the curly braces. I have no idea which one is the more common. It should be up to you guys to judge what Italians need :-)

alejho commented 6 years ago

Ok so..."Italian" and "Italian 142" are two (phisically) different keyboards...I can say that the first one is much more commont than the second one. The point is that, for some special symbols, the same "Italian" keyboard behave differently on different environments.

For this library I suppose the best choice is to reproduce the "linux system" version simply because going this way there's no need to touch the code of the library itself and you can get all the symbols. Otherwhise you'll have to manage a new "state" in the library (Alt_Gr + Shift) just for the italian keyboard and just for a few symbols (or also for other keyboards/symbols...who knows?).

But if you're implementing a brand new "italian keyboard library" I would go for the "Italian" layout whit "Windows" Keys combo for special symbols (this is absolutely the most popular case).

On Fri, Aug 10, 2018 at 10:14 AM, Marcel van Kervinck < notifications@github.com> wrote:

I this Googled a lot, and I get the impression there are two types defined in Windows (which I also don't have):

http://kbdlayout.info/00000410/ "Italian" http://kbdlayout.info/00010410/ "Italian 142"

They indeed differ in the location of the curly braces. I have no idea which one is the more common. It should be up to you guys to judge what Italians need :-)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/PaulStoffregen/PS2Keyboard/pull/12#issuecomment-412010783, or mute the thread https://github.com/notifications/unsubscribe-auth/AQFSQqZazAW_c8OdgQJqxKMyyLz6No53ks5uPUDQgaJpZM4RNnA3 .