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?
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?
ASKER
Still trying to make sense of the first link, (a lot of unfamiliar stuff in there). But the second link goes nowhere.
the "\" is extra in the last link send by Mikal613
it is
https://www.experts-exchange.com/questions/20664907/locking-keyboard-and-mouse-controls.html
it is
https://www.experts-exchange.com/questions/20664907/locking-keyboard-and-mouse-controls.html
thanks ;) /
One way is to intercept the keypress's with this sample....
Protected Overrides Function ProcessCmdKey(ByRef msg As System.Windows.Forms.Messa ge, 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
Protected Overrides Function ProcessCmdKey(ByRef msg As System.Windows.Forms.Messa
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
ASKER
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.
And those that look at disabling the keyboard don't seem to address how to disable one keyboard, but not the other.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
and just intercept the input keys with the code I gave you.
Hi zac_twidale,
Have you worked thru this problem?
Have you worked thru this problem?
ASKER
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sounds like a pretty good lead. Thanks for that
https://www.experts-exchange.com/questions/20566106/Keyboard-Mouse-Hook.html
http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/Q_20664907.html\