ASCII code for Win+R

-1

Is it possible to "emulate" the keystroke Win+R (or more generally speaking: any combination with Win key) with an ASCII code?

It is possible to send Ctrl+Something as an ASCII code, so I wonder whether it can be expanded on other keys (like Win).

Cheers.

boleslaw.smialy

Posted 2015-12-02T15:01:41.303

Reputation: 881

2What problem are you trying to solve precisely? Knowing what your actual problem is, might prevent this question, from being closed or down voted into oblivion. – Ramhound – 2015-12-02T15:07:57.553

2AFAIK, win, shift, ctrl and alt are usually referred to as "virtual key states." Programs (or the OS libraries) will receive the "normal keys" and then check the key states and then {do magic}. So you cannot send an ascii code, you want to "emulate keystrokes" using, e.g. SendKeys() – Yorik – 2015-12-02T15:14:36.230

There is no ASCII code for the Windows key. See this answer on SO

– Burgi – 2015-12-03T16:05:34.167

Answers

3

No. ASCII code represents a single character. What you are asking for is a key combination, not a character. The only way you can send a key combination like in your example is if that key combination represents a character. I.E. if Ctrl + 4 produced a character then ASCII code would represent that character but something, like software, would still need to convert the character back to a key stroke.

Eric F

Posted 2015-12-02T15:01:41.303

Reputation: 3 070

Obviously this is not true. First 31 codes are not characters. That's why we speak about ASCII codes table, not ASCII characters table. First 31 codes are emulated in many cases by key (e.g. ASCII#9 = TAB or ASCII#27 = ESC) or key combination (e.g. ASCII#3 = ETX, represented on Unix as Ctrl+C). That's why I asked whether there is any way to map/emulate Win key by ASCII code. – boleslaw.smialy – 2015-12-04T09:21:19.563