Keyboard capture with ProcessCmdKey

flynn

Regular
Joined
Jul 28, 2005
Messages
59
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.

Code:
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
 
There should be no difference between catching Crtl+F or a Ctrl+J; both worked on this pc in fact.

Is there some other application running that has already installed a hook for the Ctrl+J combination?
 
Back
Top