Ruslan Plastun
Ruslan Plastun

Reputation: 2254

To what ASCII codes are attached?

Let's say I have Q letter in the top-left corner of my QWERTY keyboard and it has 81 ASCII code. On the AZERTY keyboard the top-left key is A. So if I click A on the AZERTY keyboard what code will be fired? Same 81 (if ASCII orients by the geographical key place) or 65 (if ASCII orients by the Latin letters)?

I am curious because I want my WASD keys (for character moving) to be placed in the same geographical place on any keyboard layout. How can I do that?

Upvotes: 1

Views: 414

Answers (2)

T.J. Crowder
T.J. Crowder

Reputation: 1074465

I am curious because I want my WASD keys (for character moving) to be placed in the same geographical place on any keyboard layout. How can I do that?

Your best bet is probably to offer a configuration stage where the end use chooses the keys they want to use. That way, you not only support different keyboard layouts, but left- and right-handed people, people with disabilities who may prefer a different arrangement, etc.

Upvotes: 2

Moti Korets
Moti Korets

Reputation: 3748

ASCII encodes letters and not keyboard keys for this reason symbol A is encoded by 81 number no matter where the key is on the keyboard layout. Some operation systems will allow you to map keys or have special software for that purpose but to give a concrete answer we need more details about your setup (hardware, software, OS e.t.c)

Upvotes: 2

Related Questions