Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added handling for more keys #427

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions Source/Eto.WinForms/KeyMap.cs
Expand Up @@ -132,10 +132,22 @@ static KeyMap()
keymap.Add(swf.Keys.Escape, Keys.Escape);
keymap.Add(swf.Keys.Delete, Keys.Delete);
keymap.Add(swf.Keys.Back, Keys.Backspace);
keymap.Add(swf.Keys.Multiply, Keys.Multiply);
keymap.Add(swf.Keys.Divide, Keys.Divide);
keymap.Add(swf.Keys.Add, Keys.Add);
keymap.Add(swf.Keys.Enter, Keys.Enter);
keymap.Add(swf.Keys.Insert, Keys.Insert);
keymap.Add(swf.Keys.OemPeriod, Keys.Period);
keymap.Add(swf.Keys.Oemcomma, Keys.Comma);
keymap.Add(swf.Keys.OemMinus, Keys.Minus);
keymap.Add(swf.Keys.Oemplus, Keys.Plus);
keymap.Add(swf.Keys.OemPipe, Keys.Pipe);
keymap.Add(swf.Keys.OemSemicolon, Keys.Semicolon);
keymap.Add(swf.Keys.OemQuotes, Keys.Quote);
keymap.Add(swf.Keys.OemOpenBrackets, Keys.LeftBracket);
keymap.Add(swf.Keys.OemCloseBrackets, Keys.RightBracket);
keymap.Add(swf.Keys.OemQuestion, Keys.Question);
keymap.Add(swf.Keys.OemBackslash, Keys.Backslash);
keymap.Add(swf.Keys.Tab, Keys.Tab);
keymap.Add(swf.Keys.Apps, Keys.ContextMenu);
keymap.Add(swf.Keys.CapsLock, Keys.CapsLock);
Expand Down
15 changes: 13 additions & 2 deletions Source/Eto/Forms/Key.cs
Expand Up @@ -187,8 +187,19 @@ public enum Keys
/// <summary> /// The context menu Key /// </summary>
ContextMenu = 0x0063,

/// <summary>The Shift Key Modifier</summary>
Shift = 0x1000,
/// <summary>The Multiply '*' Key</summary>
Multiply = 0x0064,
/// <summary>The Add '+' Key</summary>
Add = 0x0065,

/// <summary>The Pipe '|' Key</summary>
Pipe = 0x0066,

/// <summary>The Question '?' Key</summary>
Question = 0x0067,

/// <summary>The Shift Key Modifier</summary>
Shift = 0x1000,
/// <summary>The Alt Key Modifier</summary>
Alt = 0x2000,
/// <summary>The Control Key Modifier</summary>
Expand Down