crimsoncantab / aok-hotkeys

Hotkey Editor for Age of Empires II
Other
25 stars 9 forks source link

Support of UTF-8 characters #42

Closed Beetix closed 8 years ago

Beetix commented 8 years ago

Hi,

I have a keyboard with accentuated character keys and they show up as unassigned on the GUI when typed. They are properly recognized by the in game GUI though. Is it a bug or not supported ?

Thanks

crimsoncantab commented 8 years ago

They're not currently supported. Are you able to assign hotkeys to UTF-8 characters in-game? Based on the storage format of the hotkeys I didn't think AoK supported anything beyond ASCII.

On Sat, Jul 16, 2016, 8:21 AM Beetix notifications@github.com wrote:

Hi,

I have a keyboard with accentuated character keys and they show up as unassigned on the GUI when typed. Is it a bug or not supported ?

Thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/crimsoncantab/aok-hotkeys/issues/42, or mute the thread https://github.com/notifications/unsubscribe-auth/AEJeADpq7YZQWeUhpdg6Xxna8VSAP7Fbks5qWOjWgaJpZM4JOBVG .

Loren McGinnis

Beetix commented 8 years ago

Sorry I edited my message a few minutes after posting the issue when I realised that I forgot to mention that it works in-game. Yes I am able to assign hotkeys to UTF-8 characters in-game.

Thanks

crimsoncantab commented 8 years ago

Interesting. It probably still boils down to a keycode of some sort that your keyboard sends to the browser/game, and the browser editor just doesn't recognize the keycode. If you go here and type some of your accent keys, what kind of keycodes do you get?

crimsoncantab commented 8 years ago

(If you were able to try different browsers, that would be helpful as well).

Beetix commented 8 years ago

I have looked into it today and here are my results. Keycode.info gave nothing on firefox but worked on chrome. It gave: 186 for é, 191 for è, 221 for à, 220 for ç, 219 for ^ and 192 for '. By the way, here is the layout I am using, the french equivalent of dvorak. I have attached 2 in-game screenshots to show you that the accent keys are properly displayed. agrave ccedilla The last attachment is a screenshot in your hotkey editor. I have uploaded the modified player0.hki. hotkeyeditor You will see that the accent keys are interpreted differently: the é becomes an ;, the è an /, the à an ], the ^ an [ and the ç an \. I have noticed this translation in several other games. The good news is that under chrome I can change the hotkeys with accent keys. They are not properly displayed in your hotkey editor but they are properly displayed in the in-game editor once the file is uploaded back.

In the end I am not sure it is really important to bother about my layout since it isn't very common and the games usually don't seem to support it well (although AoE does !). I can handle the character translation ^^ and I might switch back to a more "conventional" layout when playing games.

Thanks

crimsoncantab commented 8 years ago

Thanks so much for investigating!

That explanation really helps. I've had other requests to support AZERTY, etc, but it's tricky to test those out thoroughly, especially when browsers behave differently.