Link to home
Start Free TrialLog in
Avatar of zac_twidale
zac_twidale

asked on

Multiple Keyboards

I am planning to write an application involving a rewired keyboard plugged in to a laptop, to enable a large number of dedicated function keys, simplifying the user interface.

Is there anyway to differentiate between input from the inbuilt keyboard and the rewired external one?  

Or as a secondary solution, is there anyway to temporarily disable the internal keyboard when I go into the phase of the program which I'm designing the external keyboard for?
Avatar of Mikal613
Mikal613
Flag of United States of America image

Avatar of zac_twidale
zac_twidale

ASKER

Still trying to make sense of the first link, (a lot of unfamiliar stuff in there).  But the second link goes nowhere.
thanks ;) /
One way is to intercept the keypress's with this sample....

   Protected Overrides Function ProcessCmdKey(ByRef msg As System.Windows.Forms.Message, ByVal keyData As System.Windows.Forms.Keys) As Boolean
        Const WM_KEYDOWN As Integer = &H100
        Const WM_SYSKEYDOWN As Integer = &H104
        Dim e As System.EventArgs

        If ((msg.Msg = WM_KEYDOWN) Or (msg.Msg = WM_SYSKEYDOWN)) Then
            Select Case (keyData)
                'The Number Key Pads, 10 key and regular 0-9 keys
            Case Keys.NumPad0, Keys.D0
                    'Do something
                Case Keys.NumPad1, Keys.D1
                    'Do something
                Case Keys.NumPad2, Keys.D2
                     'Do something
            End Select
        End If
        Return MyBase.ProcessCmdKey(msg, keyData)
    End Function
I'll go through the suggested solutions in detail, but they seem to address various means of intercepting keyboard input (which I can do).  They don't look at how to differentiate between which keyboard the input came from.

And those that look at disabling the keyboard don't seem to address how to disable one keyboard, but not the other.
SOLUTION
Avatar of armoghan
armoghan
Flag of Pakistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
you said "rewired external one". I think the best route to go would be to leave the key board as a standard key board
and just intercept the input keys  with the code I gave you.
Hi zac_twidale,

Have you worked thru this problem?
Nope, not yet.  armoghan's link helps a little, and I have got hold of the DDK, but am still a long way from making sense of it.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sounds like a pretty good lead.  Thanks for that