Created
June 14, 2011 03:30
-
-
Save nissuk/1024257 to your computer and use it in GitHub Desktop.
C#: System.Windows.Forms.Keysの値
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Name Value Value(binary) | |
---- ----- ------------- | |
None 0 00000000000000000000000000000000 | |
LButton 1 00000000000000000000000000000001 | |
RButton 2 00000000000000000000000000000010 | |
Cancel 3 00000000000000000000000000000011 | |
MButton 4 00000000000000000000000000000100 | |
XButton1 5 00000000000000000000000000000101 | |
XButton2 6 00000000000000000000000000000110 | |
Back 8 00000000000000000000000000001000 | |
Tab 9 00000000000000000000000000001001 | |
LineFeed 10 00000000000000000000000000001010 | |
Clear 12 00000000000000000000000000001100 | |
Enter 13 00000000000000000000000000001101 | |
Return 13 00000000000000000000000000001101 | |
ShiftKey 16 00000000000000000000000000010000 | |
ControlKey 17 00000000000000000000000000010001 | |
Menu 18 00000000000000000000000000010010 | |
Pause 19 00000000000000000000000000010011 | |
CapsLock 20 00000000000000000000000000010100 | |
Capital 20 00000000000000000000000000010100 | |
HangulMode 21 00000000000000000000000000010101 | |
HanguelMode 21 00000000000000000000000000010101 | |
KanaMode 21 00000000000000000000000000010101 | |
JunjaMode 23 00000000000000000000000000010111 | |
FinalMode 24 00000000000000000000000000011000 | |
KanjiMode 25 00000000000000000000000000011001 | |
HanjaMode 25 00000000000000000000000000011001 | |
Escape 27 00000000000000000000000000011011 | |
IMEConvert 28 00000000000000000000000000011100 | |
IMENonconvert 29 00000000000000000000000000011101 | |
IMEAccept 30 00000000000000000000000000011110 | |
IMEAceept 30 00000000000000000000000000011110 | |
IMEModeChange 31 00000000000000000000000000011111 | |
Space 32 00000000000000000000000000100000 | |
Prior 33 00000000000000000000000000100001 | |
PageUp 33 00000000000000000000000000100001 | |
PageDown 34 00000000000000000000000000100010 | |
Next 34 00000000000000000000000000100010 | |
End 35 00000000000000000000000000100011 | |
Home 36 00000000000000000000000000100100 | |
Left 37 00000000000000000000000000100101 | |
Up 38 00000000000000000000000000100110 | |
Right 39 00000000000000000000000000100111 | |
Down 40 00000000000000000000000000101000 | |
Select 41 00000000000000000000000000101001 | |
Print 42 00000000000000000000000000101010 | |
Execute 43 00000000000000000000000000101011 | |
Snapshot 44 00000000000000000000000000101100 | |
PrintScreen 44 00000000000000000000000000101100 | |
Insert 45 00000000000000000000000000101101 | |
Delete 46 00000000000000000000000000101110 | |
Help 47 00000000000000000000000000101111 | |
D0 48 00000000000000000000000000110000 | |
D1 49 00000000000000000000000000110001 | |
D2 50 00000000000000000000000000110010 | |
D3 51 00000000000000000000000000110011 | |
D4 52 00000000000000000000000000110100 | |
D5 53 00000000000000000000000000110101 | |
D6 54 00000000000000000000000000110110 | |
D7 55 00000000000000000000000000110111 | |
D8 56 00000000000000000000000000111000 | |
D9 57 00000000000000000000000000111001 | |
A 65 00000000000000000000000001000001 | |
B 66 00000000000000000000000001000010 | |
C 67 00000000000000000000000001000011 | |
D 68 00000000000000000000000001000100 | |
E 69 00000000000000000000000001000101 | |
F 70 00000000000000000000000001000110 | |
G 71 00000000000000000000000001000111 | |
H 72 00000000000000000000000001001000 | |
I 73 00000000000000000000000001001001 | |
J 74 00000000000000000000000001001010 | |
K 75 00000000000000000000000001001011 | |
L 76 00000000000000000000000001001100 | |
M 77 00000000000000000000000001001101 | |
N 78 00000000000000000000000001001110 | |
O 79 00000000000000000000000001001111 | |
P 80 00000000000000000000000001010000 | |
Q 81 00000000000000000000000001010001 | |
R 82 00000000000000000000000001010010 | |
S 83 00000000000000000000000001010011 | |
T 84 00000000000000000000000001010100 | |
U 85 00000000000000000000000001010101 | |
V 86 00000000000000000000000001010110 | |
W 87 00000000000000000000000001010111 | |
X 88 00000000000000000000000001011000 | |
Y 89 00000000000000000000000001011001 | |
Z 90 00000000000000000000000001011010 | |
LWin 91 00000000000000000000000001011011 | |
RWin 92 00000000000000000000000001011100 | |
Apps 93 00000000000000000000000001011101 | |
Sleep 95 00000000000000000000000001011111 | |
NumPad0 96 00000000000000000000000001100000 | |
NumPad1 97 00000000000000000000000001100001 | |
NumPad2 98 00000000000000000000000001100010 | |
NumPad3 99 00000000000000000000000001100011 | |
NumPad4 100 00000000000000000000000001100100 | |
NumPad5 101 00000000000000000000000001100101 | |
NumPad6 102 00000000000000000000000001100110 | |
NumPad7 103 00000000000000000000000001100111 | |
NumPad8 104 00000000000000000000000001101000 | |
NumPad9 105 00000000000000000000000001101001 | |
Multiply 106 00000000000000000000000001101010 | |
Add 107 00000000000000000000000001101011 | |
Separator 108 00000000000000000000000001101100 | |
Subtract 109 00000000000000000000000001101101 | |
Decimal 110 00000000000000000000000001101110 | |
Divide 111 00000000000000000000000001101111 | |
F1 112 00000000000000000000000001110000 | |
F2 113 00000000000000000000000001110001 | |
F3 114 00000000000000000000000001110010 | |
F4 115 00000000000000000000000001110011 | |
F5 116 00000000000000000000000001110100 | |
F6 117 00000000000000000000000001110101 | |
F7 118 00000000000000000000000001110110 | |
F8 119 00000000000000000000000001110111 | |
F9 120 00000000000000000000000001111000 | |
F10 121 00000000000000000000000001111001 | |
F11 122 00000000000000000000000001111010 | |
F12 123 00000000000000000000000001111011 | |
F13 124 00000000000000000000000001111100 | |
F14 125 00000000000000000000000001111101 | |
F15 126 00000000000000000000000001111110 | |
F16 127 00000000000000000000000001111111 | |
F17 128 00000000000000000000000010000000 | |
F18 129 00000000000000000000000010000001 | |
F19 130 00000000000000000000000010000010 | |
F20 131 00000000000000000000000010000011 | |
F21 132 00000000000000000000000010000100 | |
F22 133 00000000000000000000000010000101 | |
F23 134 00000000000000000000000010000110 | |
F24 135 00000000000000000000000010000111 | |
NumLock 144 00000000000000000000000010010000 | |
Scroll 145 00000000000000000000000010010001 | |
LShiftKey 160 00000000000000000000000010100000 | |
RShiftKey 161 00000000000000000000000010100001 | |
LControlKey 162 00000000000000000000000010100010 | |
RControlKey 163 00000000000000000000000010100011 | |
LMenu 164 00000000000000000000000010100100 | |
RMenu 165 00000000000000000000000010100101 | |
BrowserBack 166 00000000000000000000000010100110 | |
BrowserForward 167 00000000000000000000000010100111 | |
BrowserRefresh 168 00000000000000000000000010101000 | |
BrowserStop 169 00000000000000000000000010101001 | |
BrowserSearch 170 00000000000000000000000010101010 | |
BrowserFavorites 171 00000000000000000000000010101011 | |
BrowserHome 172 00000000000000000000000010101100 | |
VolumeMute 173 00000000000000000000000010101101 | |
VolumeDown 174 00000000000000000000000010101110 | |
VolumeUp 175 00000000000000000000000010101111 | |
MediaNextTrack 176 00000000000000000000000010110000 | |
MediaPreviousTrack 177 00000000000000000000000010110001 | |
MediaStop 178 00000000000000000000000010110010 | |
MediaPlayPause 179 00000000000000000000000010110011 | |
LaunchMail 180 00000000000000000000000010110100 | |
SelectMedia 181 00000000000000000000000010110101 | |
LaunchApplication1 182 00000000000000000000000010110110 | |
LaunchApplication2 183 00000000000000000000000010110111 | |
OemSemicolon 186 00000000000000000000000010111010 | |
Oem1 186 00000000000000000000000010111010 | |
Oemplus 187 00000000000000000000000010111011 | |
Oemcomma 188 00000000000000000000000010111100 | |
OemMinus 189 00000000000000000000000010111101 | |
OemPeriod 190 00000000000000000000000010111110 | |
Oem2 191 00000000000000000000000010111111 | |
OemQuestion 191 00000000000000000000000010111111 | |
Oem3 192 00000000000000000000000011000000 | |
Oemtilde 192 00000000000000000000000011000000 | |
Oem4 219 00000000000000000000000011011011 | |
OemOpenBrackets 219 00000000000000000000000011011011 | |
OemPipe 220 00000000000000000000000011011100 | |
Oem5 220 00000000000000000000000011011100 | |
OemCloseBrackets 221 00000000000000000000000011011101 | |
Oem6 221 00000000000000000000000011011101 | |
OemQuotes 222 00000000000000000000000011011110 | |
Oem7 222 00000000000000000000000011011110 | |
Oem8 223 00000000000000000000000011011111 | |
Oem102 226 00000000000000000000000011100010 | |
OemBackslash 226 00000000000000000000000011100010 | |
ProcessKey 229 00000000000000000000000011100101 | |
Packet 231 00000000000000000000000011100111 | |
Attn 246 00000000000000000000000011110110 | |
Crsel 247 00000000000000000000000011110111 | |
Exsel 248 00000000000000000000000011111000 | |
EraseEof 249 00000000000000000000000011111001 | |
Play 250 00000000000000000000000011111010 | |
Zoom 251 00000000000000000000000011111011 | |
NoName 252 00000000000000000000000011111100 | |
Pa1 253 00000000000000000000000011111101 | |
OemClear 254 00000000000000000000000011111110 | |
KeyCode 65535 00000000000000001111111111111111 | |
Shift 65536 00000000000000010000000000000000 | |
Control 131072 00000000000000100000000000000000 | |
Alt 262144 00000000000001000000000000000000 | |
Modifiers -65536 11111111111111110000000000000000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Windows.Forms; | |
namespace ConsoleApplication1 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Console.WriteLine("{0, 20} {1, 10} {2, -32}", "Name", "Value", "Value(binary)"); | |
Console.WriteLine("{0, 20} {1, 10} {2, -32}", "----", "-----", "-------------"); | |
foreach (var name in Enum.GetNames(typeof(Keys))) | |
{ | |
var value = (int)Enum.Parse(typeof(Keys), name); | |
Console.WriteLine( | |
"{0, 20} {1, 10} {2}", | |
name, value, Convert.ToString(value, 2).PadLeft(32, '0') | |
); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment