I want to use System.Windows.Forms.Keys with a variable for example
shortcutkey = "A"
keydata = System.Windows.Forms.Keys.shortcutkey
Is this possible?
The idea was to implement custom shortcuts that the user specifies to perform certain actions.
My code is like this
If (((BindingFunctions.IsKeyDown(Keys.ControlKey) AndAlso BindingFunctions.IsKeyDown(Keys.ShiftKey)) AndAlso BindingFunctions.IsKeyDown(keyData)) AndAlso (keyData = Keys.L)) Then
CC.LC()
End If
Here I am giving keyData = Keys.L directly. Instead of this I would like to do it with a variable like
mykeydata = "L"
If (((BindingFunctions.IsKeyDown(Keys.ControlKey) AndAlso BindingFunctions.IsKeyDown(Keys.ShiftKey)) AndAlso BindingFunctions.IsKeyDown(keyData)) AndAlso (keyData = Keys.mykeydata)) Then
CC.LC()
End If
1 Answer