[GH-ISSUE #194] [Keylogger] Handle Modifier key AltGr correctly #81

Closed
opened 2026-02-27 15:48:39 +03:00 by kerem · 2 comments
Owner

Originally created by @MaxXor on GitHub (May 25, 2015).
Original GitHub issue: https://github.com/quasar/Quasar/issues/194

When pressing AltGr + 2 it shows [Control + Alt + D2], correct behaviour would be ².
If your keyboard doesn't have an AltGr key, you can also use Control + Alt for this.

Originally created by @MaxXor on GitHub (May 25, 2015). Original GitHub issue: https://github.com/quasar/Quasar/issues/194 When pressing `AltGr + 2` it shows `[Control + Alt + D2]`, correct behaviour would be `²`. If your keyboard doesn't have an AltGr key, you can also use `Control + Alt` for this.
kerem 2026-02-27 15:48:39 +03:00
Author
Owner

@ghost commented on GitHub (May 25, 2015):

I will keep looking into this. From what I've read, and experimented with, this might not be a feasible fix, but I won't give up!

<!-- gh-comment-id:105198800 --> @ghost commented on GitHub (May 25, 2015): I will keep looking into this. From what I've read, and experimented with, this might not be a feasible fix, but I won't give up!
Author
Owner

@ghost commented on GitHub (May 25, 2015):

This explains what I have experimented with.

The differences between the two keypresses resulted in the following, on my system with a german keyboard layout (non german keyboard):

There might be some way to hack this together to detect if the last two KeyDown keys are equivalent to the AltGr input data, and emulate the input to get the unicode value from the ToUnicodeEx method. Initally, pressing Alt Gr would post the symbol character to the active window, however our KeyPress event wouldn't receive the symbol (UnicodeEx would not return the character) I'll play around with it and see what I can come up with.

This is what I mean by emulating AltGr:

<!-- gh-comment-id:105201002 --> @ghost commented on GitHub (May 25, 2015): This explains what I have experimented with. ![](http://puu.sh/hZKAc/138f1acbb1.png) The differences between the two keypresses resulted in the following, on my system with a german keyboard layout (non german keyboard): ![](http://puu.sh/hZKE0/a03c405a3e.png) There might be some way to hack this together to detect if the last two KeyDown keys are equivalent to the AltGr input data, and emulate the input to get the unicode value from the ToUnicodeEx method. Initally, pressing Alt Gr would post the symbol character to the active window, however our KeyPress event wouldn't receive the symbol (UnicodeEx would not return the character) I'll play around with it and see what I can come up with. This is what I mean by emulating AltGr: ![](http://puu.sh/hZNsX/5d00f4fc03.png)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Quasar#81
No description provided.