[Doublecommand-devel] Keyboard specific rules
Brought to you by:
mbaltaks
|
From: William U. <wil...@cs...> - 2006-07-17 08:21:27
|
Hi all,
My name is Will. I'm new here. Hi. *waves*
I previously used uControl. Specifically, I *sometimes* use an
external keyboard on my Powerbook. I want the command (windows) and
option (alt) keys swapped on that external keyboard, but not on my
built-in keyboard - that makes my finger memory work everywhere.
uControl allowed this keyboard-specific control. Unfortunately, when
Tiger came it stopped working.
I just noticed that DoubleCommand has acquired Tiger
compatibility. So I grabbed the source and hacked it to
differentiate between my two keyboards. This is a quick, ugly hack,
but it works for me. I'm not sure if I'll get more time to spend on
it, and I have scratched my own itch so it isn't as high a priority
as it was, but here is my ugly hack:
Index: kext/Substitute.cpp
===================================================================
--- kext/Substitute.cpp (revision 151)
+++ kext/Substitute.cpp (working copy)
@@ -59,6 +59,13 @@
lastKeyboardType = *keyboardType;
+ if (lastKeyboardType == 37) { // Will's ugly hack - ignore my
internal keyboard type
+ if (dcConfig & MB_DEBUG_OUTPUT) {
+ printf("Ignoring internal keybaord\n");
+ }
+ return 0;
+ }
+
if( (dcConfig & CAPSLOCK_DISABLED))
{
removeFlags |= CAPSLOCK_FLAG;
BTW, is there a reason the development archives are not set up?
It means that noone not on the list now will ever see this...
Be well,
Will :-}
|