I use a full-size Apple USB keyboard while at my desk but would love to remap my MacBook Pro's Enter key to be another Option key. I poked around a bit but didn't find an obvious way to maintain two different profiles, one for the built-in keyboard and another for my external USB keyboard. Did I miss it? If not, consider this a feature request ;)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In an older version, I thought I remember this being the default for that setting. Not sure when it changed, but I'd love to find a way to change it back!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Update: I got the code from the SVN repository and made the modifications. I'm not really a C programmer so this is a quick and dirty way to do it, but it worked like a champ.
On line 71 of Substitute.cpp I added:
if ( *keyboardType == 37 ) {
and then on line 115, a close bracket:
}
This makes the "remap enter to X" functionality only apply to keyboard type 37 (MacBook Pro, officially called "POWERBOOKG4_2005_KEYBOARD").
A cleverer or more motivated programmer would have probably done something different, but it worked. :-)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've thought about this as well (I even emailed Michael to suggest it), and while it would be by far the best solution if DoubleCommand could detect the keyboard itself, it might be rather difficult. (Although I really don't know.)
A temporary solution could be to allow you to save "templates" in where you've defined a number of checked fields, and then could be able to switch between them. That would be a great deal easier than the current state.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Having different "profiles" for different keyboards would also make it easy to use external "non Mac" keyboards with the portables - which is actually the reason that got me interested in DoubleCommand in the first place!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Me too!
This would be a great great feature since I use a MacBook with a external USB PC keyboard.
This means, "Win/Command" (internal) = "Alt" (USB) and "Command" (internal) = "Alt" (USB).
Toggling both also toggles on the internal keyboard.
It would be great it DoubleCommand could apply the settings only for the external Keyboard. (see also comment from mancini-netreo).
I would assist but have absolutely no experience with MacOS development :(
Martin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm using a Dinovo RF Notebook keyboard and ControllerMate with an MBP, but I'd like to be able to remap the 'Return' button on the MBP internal keyboard, whilst also doing the standard key swap on the Dinovo's Windows layout.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've just commited code to subversion that gives the kext 4 separate settings, each with (optionally) it's own keyboard id. There's still work to do to hook this into the saved settings and then the preference pane, but it's on the way.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm using a MacBook Pro and an External keyboard, but I can't seem to figure out how to implement this 'different behaviours for different keyboards' thing. I've tried using the *keyboardType == 37 trick from above, but both keyboards still give out a Forward Delete action instead of the Enter for the keypad on the external keyboard.
Anyone else able to do this?
(I've used different versions of the SVN code, and still no joy - I even found the version that had the same line numbers as James Mancini used, but no luck).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Just use the latest code from subversion, and then you will see that in addition to the dc.config sysctl variable there are numbered variable pairs starting with dc.keyboard1 and dc.config1. If you put a keyboard ID into dc.keyboard1, then the DoubleCommand config number in dc.config1 will only apply to the keyboard with that ID. I've allowed for 4 of these separate keyboard settings, I think that should cover most situations!
The above will make backslash be a forward delete key, but only on a keyboard with ID 37. While this is in the kext already, exposing this all the way through the other layers up into the pref pane is work I haven't yet had time for.
Hope that helps,
-Michael.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
ok. i've built and am happily running DC from the latest svn image although i'm currently manually switching between configurations. what i don't see (either in AboutThisMac or in the obvious places in the code—i'm probbably missing something less obvious—is how to figure out what keyboard ID i have so that i can configure things properly. at the moment i have the built in mbp keyboard and an external logitech bluetooth cordless elite keyboard. is there a simple way to figure out the magic keyboard ID value for these (or others later on)?
thanks,
---K
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You need to turn on debug output in the preference pane, then look at the file /var/log/system.log as you press a key. You'll see an entry for kbdType, the number that follows is your keyboard ID.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I use a full-size Apple USB keyboard while at my desk but would love to remap my MacBook Pro's Enter key to be another Option key. I poked around a bit but didn't find an obvious way to maintain two different profiles, one for the built-in keyboard and another for my external USB keyboard. Did I miss it? If not, consider this a feature request ;)
In an older version, I thought I remember this being the default for that setting. Not sure when it changed, but I'd love to find a way to change it back!
Update: I got the code from the SVN repository and made the modifications. I'm not really a C programmer so this is a quick and dirty way to do it, but it worked like a champ.
On line 71 of Substitute.cpp I added:
if ( *keyboardType == 37 ) {
and then on line 115, a close bracket:
}
This makes the "remap enter to X" functionality only apply to keyboard type 37 (MacBook Pro, officially called "POWERBOOKG4_2005_KEYBOARD").
A cleverer or more motivated programmer would have probably done something different, but it worked. :-)
I've thought about this as well (I even emailed Michael to suggest it), and while it would be by far the best solution if DoubleCommand could detect the keyboard itself, it might be rather difficult. (Although I really don't know.)
A temporary solution could be to allow you to save "templates" in where you've defined a number of checked fields, and then could be able to switch between them. That would be a great deal easier than the current state.
Having different "profiles" for different keyboards would also make it easy to use external "non Mac" keyboards with the portables - which is actually the reason that got me interested in DoubleCommand in the first place!
Sign me up for the ability to ONLY remap when an external keyboard is plugged in.
Me too!
This would be a great great feature since I use a MacBook with a external USB PC keyboard.
This means, "Win/Command" (internal) = "Alt" (USB) and "Command" (internal) = "Alt" (USB).
Toggling both also toggles on the internal keyboard.
It would be great it DoubleCommand could apply the settings only for the external Keyboard. (see also comment from mancini-netreo).
I would assist but have absolutely no experience with MacOS development :(
Martin
Me thrice!
I'm using a Dinovo RF Notebook keyboard and ControllerMate with an MBP, but I'd like to be able to remap the 'Return' button on the MBP internal keyboard, whilst also doing the standard key swap on the Dinovo's Windows layout.
I've just commited code to subversion that gives the kext 4 separate settings, each with (optionally) it's own keyboard id. There's still work to do to hook this into the saved settings and then the preference pane, but it's on the way.
Make that four!
This would be a fantastic feature, so much so it should be built into the OS itself.
I'm using a MacBook Pro and an External keyboard, but I can't seem to figure out how to implement this 'different behaviours for different keyboards' thing. I've tried using the *keyboardType == 37 trick from above, but both keyboards still give out a Forward Delete action instead of the Enter for the keypad on the external keyboard.
Anyone else able to do this?
(I've used different versions of the SVN code, and still no joy - I even found the version that had the same line numbers as James Mancini used, but no luck).
Just use the latest code from subversion, and then you will see that in addition to the dc.config sysctl variable there are numbered variable pairs starting with dc.keyboard1 and dc.config1. If you put a keyboard ID into dc.keyboard1, then the DoubleCommand config number in dc.config1 will only apply to the keyboard with that ID. I've allowed for 4 of these separate keyboard settings, I think that should cover most situations!
So:
sysctl -w dc.keyboard1=37
sysctl -w dc.config1=131072
The above will make backslash be a forward delete key, but only on a keyboard with ID 37. While this is in the kext already, exposing this all the way through the other layers up into the pref pane is work I haven't yet had time for.
Hope that helps,
-Michael.
ok. i've built and am happily running DC from the latest svn image although i'm currently manually switching between configurations. what i don't see (either in AboutThisMac or in the obvious places in the code—i'm probbably missing something less obvious—is how to figure out what keyboard ID i have so that i can configure things properly. at the moment i have the built in mbp keyboard and an external logitech bluetooth cordless elite keyboard. is there a simple way to figure out the magic keyboard ID value for these (or others later on)?
thanks,
---K
You need to turn on debug output in the preference pane, then look at the file /var/log/system.log as you press a key. You'll see an entry for kbdType, the number that follows is your keyboard ID.