Skip to content

How to bind a command to the keyboard key "/" ? #1612

Answered by d2phap
gaberiel44 asked this question in Q&A
Discussion options

You must be logged in to vote

The hotkey uses Winforms Keys enum with some basic key mapping:

public static Dictionary<string, Keys> CharToKeyMapping => new()
{
{ "`", Keys.Oemtilde },
{ "-", Keys.OemMinus },
{ "=", Keys.Oemplus },
{ "[", Keys.OemOpenBrackets },
{ "]", Keys.OemCloseBrackets },
{ "\\", Keys.Oem5 },
{ ";", Keys.Oem1 },
{ "'", Keys.Oem7 },
{ ",", Keys.Oemcomma },
{ ".", Keys.OemPeriod },
{ "/", Keys.OemQuestion },
{ "0", Keys.D0 },
{ "1", Keys.D1 },
{ "2", Keys.D2 },
{ "3", Keys.D3 },
{ "4", Keys.D4 },
{ "5", Keys.D5 },

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@gaberiel44
Comment options

Answer selected by gaberiel44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants