Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > program for swaping caps and ctrl key

program for swaping caps and ctrl key
Thread Tools
Fresh-Faced Recruit
Join Date: May 2001
Status: Offline
Reply With Quote
Jun 20, 2001, 12:54 PM
 
I've been looking for a way to swap the caps and ctrl key
because the control key is ergonically inconvient for emacs
and the terminal. I also know some people want to remap
other keys as well. Is it possible to write a program
or kernel extension to catch the key down event and then
resent it out as another key value? Should we write
kernel extension? If not, can a user level program listen
to system event when it's running in the background.
Post your idea here.
     
Fresh-Faced Recruit
Join Date: Jun 2001
Status: Offline
Reply With Quote
Jun 20, 2001, 01:23 PM
 
Originally posted by nomorewindows:
<STRONG>I've been looking for a way to swap the caps and ctrl key
because the control key is ergonically inconvient for emacs
and the terminal. I also know some people want to remap
other keys as well. Is it possible to write a program
or kernel extension to catch the key down event and then
resent it out as another key value? Should we write
kernel extension? If not, can a user level program listen
to system event when it's running in the background.
Post your idea here.</STRONG>

Create a file that contains :
remove Lock = Caps_Lock
remove Control = Control_L
keysym Control_L = Caps_Lock
keysym Caps_Lock = Control_L
add Lock = Caps_Lock
add Control = Control_L

and then in the terminal :
xmodmap name_of_file

that works under linux, can't test it now on osx. To come back, just do xmodmap name again.
     
Fresh-Faced Recruit
Join Date: May 2001
Status: Offline
Reply With Quote
Jun 21, 2001, 01:01 AM
 
In os X, there's not xmodmap. Even there is, it might not work
in the Finder or other Cocooa/Carbon apps.
     
Dedicated MacNNer
Join Date: Nov 2000
Location: Glasgow
Status: Offline
Reply With Quote
Jun 21, 2001, 06:55 AM
 
Your best chance is to modify the USB keyboard driver that is available through Darwin CVS.

That way, Cocoa, Carbon, Classic and BSD all get the fix.
PowerBook G4 17"
Power Mac G4/800, 1Gb RAM, 80Gb HDD, Superdrive, GeForce 4MX, Gateway 21" CRT, Apple Pro Speakers, iSub - Running Mac OS X Server 10.2
iBook 500, 192MbRAM - Running Mac OS X 10.2
iPod 5Gb
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:23 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2