Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Is it not possible to capture every CONTROL-x keyboard combination, where "x" is any alphabetic character?

 

Using the following code, I can't seem to capture CTRL-J, but CTRL-F works.

 

Protected Overrides Function ProcessCmdKey(ByRef msg As System.Windows.Forms.Message, ByVal keyData As System.Windows.Forms.Keys) As Boolean

       If (keyData = (Keys.Control Or Keys.J)) Then
           Console.WriteLine("You pressed CTRL+J")
           Return (True)
       End If

       If (keyData = (Keys.Control Or Keys.F)) Then
           Console.WriteLine("You pressed CTRL+F")
           Return (True)
       End If

       Return MyBase.ProcessCmdKey(msg, keyData)

End Function

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...