View Full Version : Apple Key and Ctrl Key
ewaldgroup
February 2nd, 2005, 01:41 AM
Is there any way to turn the Apple Key into the ctrl key?
from my research:
Apple Key --> keycode 115
Ctrl Key --> keycode 37
you can find this by running "xev" in console.
Has anyone gotten this to work on a iBook, or anything else? How would I go about doing it?
My other post similar / same topic: http://ubuntuforums.org/showthread.php?t=13373
I'm running an iBook '01 (Warty)
thanks,
ewaldgroup
t.rei
February 2nd, 2005, 10:26 AM
Is there any way to turn the Apple Key into the ctrl key?
from my research:
Apple Key --> keycode 115
Ctrl Key --> keycode 37
you can find this by running "xev" in console.
Has anyone gotten this to work on a iBook, or anything else? How would I go about doing it?
My other post similar / same topic: http://ubuntuforums.org/showthread.php?t=13373
I'm running an iBook '01 (Warty)
thanks,
ewaldgroup
I am using xmodmap (gives a warning when starting gnome once) but it gives you full control over your keaboard via a simple text-config-file :)
this is mine (powerbook g4 - german keyboard with some extras. Apple-Key== AltGR for me.
saved as .xmodmap in ~/ and executed by xmodmap .xmodmap
-------------------------------------------------------------------------------------------------
keycode 9 = Escape
keycode 10 = 1 exclam
keycode 11 = 2 quotedbl
keycode 12 = 3 section
keycode 13 = 4 dollar
keycode 14 = 5 percent
keycode 15 = 6 ampersand
keycode 16 = 7 slash braceleft
keycode 17 = 8 parenleft bracketleft
keycode 18 = 9 parenright bracketright
keycode 19 = 0 equal braceright
keycode 20 = ssharp question backslash
keycode 21 = dead_acute dead_grave
keycode 22 = BackSpace
keycode 23 = Tab ISO_Left_Tab
keycode 24 = q Q at
keycode 25 = w W
keycode 26 = e E EuroSign
keycode 27 = r R
keycode 28 = t T
keycode 29 = z Z
keycode 30 = u U
keycode 31 = i I
keycode 32 = o O
keycode 33 = p P
keycode 34 = udiaeresis Udiaeresis
keycode 35 = plus asterisk asciitilde
keycode 36 = Return
keycode 37 = Control_L
keycode 38 = a A
keycode 39 = s S
keycode 40 = d D
keycode 41 = f F
keycode 42 = g G
keycode 43 = h H
keycode 44 = j J
keycode 45 = k K
keycode 46 = l L at
keycode 47 = odiaeresis Odiaeresis braceleft
keycode 48 = adiaeresis Adiaeresis braceright
keycode 49 = dead_circumflex degree
keycode 50 = Shift_L
keycode 51 = numbersign apostrophe
keycode 52 = y Y
keycode 53 = x X
keycode 54 = c C
keycode 55 = v V
keycode 56 = b B
keycode 57 = n N
keycode 58 = m M
keycode 59 = comma semicolon bracketleft
keycode 60 = period colon bracketright
keycode 61 = minus underscore slash
keycode 62 = Shift_R
keycode 63 = KP_Multiply XF86_ClearGrab
keycode 64 = Alt_L Meta_L
keycode 65 = space
keycode 66 = Caps_Lock
keycode 67 = F1 XF86_Switch_VT_1
keycode 68 = F2 XF86_Switch_VT_2
keycode 69 = F3 XF86_Switch_VT_3
keycode 70 = F4 XF86_Switch_VT_4
keycode 71 = F5 XF86_Switch_VT_5
keycode 72 = F6 XF86_Switch_VT_6
keycode 73 = F7 XF86_Switch_VT_7
keycode 74 = F8 XF86_Switch_VT_8
keycode 75 = F9 XF86_Switch_VT_9
keycode 76 = F10 XF86_Switch_VT_10
keycode 77 = Num_Lock Pointer_EnableKeys
keycode 78 = Scroll_Lock
keycode 79 = KP_Home KP_7
keycode 80 = KP_Up KP_8
keycode 81 = KP_Prior KP_9
keycode 82 = KP_Subtract XF86_Prev_VMode
keycode 83 = KP_Left KP_4
keycode 84 = KP_Begin KP_5
keycode 85 = KP_Right KP_6
keycode 86 = KP_Add XF86_Next_VMode
keycode 87 = KP_End KP_1
keycode 88 = KP_Down KP_2
keycode 89 = KP_Next KP_3
keycode 90 = KP_Insert KP_0
keycode 91 = KP_Delete KP_Separator
keycode 92 = Print Sys_Req
keycode 93 = Mode_switch
keycode 94 = less greater bar
keycode 95 = F11 XF86_Switch_VT_11
keycode 96 = F12 XF86_Switch_VT_12
keycode 97 = Home
keycode 98 = Up
keycode 99 = Prior
keycode 100 = Left
keycode 102 = Right
keycode 103 = End
keycode 104 = Down
keycode 105 = Next
keycode 106 = Insert
keycode 107 = Delete
keycode 108 = Delete
keycode 109 = Control_R
keycode 110 = Pause Break
keycode 111 = Print Sys_Req
keycode 112 = KP_Divide XF86_Ungrab
keycode 113 = ISO_Level3_Shift Multi_key
keycode 114 = Pause Break
keycode 115 = Mode_switch
keycode 116 = Super_R
keycode 117 = Menu
keycode 124 = ISO_Level3_Shift
keycode 125 = NoSymbol Alt_L
keycode 126 = KP_Equal
keycode 127 = NoSymbol Super_L
keycode 128 = NoSymbol Hyper_L
keycode 156 = NoSymbol Meta_L
ewaldgroup
February 2nd, 2005, 02:05 PM
Ok. I made a new file .xmodmap and the only thing i put in was:keycode 115 = Control_L
That should do it right? But when i restarted, gnome said that there was a keyboard modifier file and it would be ignorred. when i tried it, it didnt work.
How can i get this to work. it has to be possible...
-ewaldgroup :confused:
t.rei
February 2nd, 2005, 03:52 PM
Ok. I made a new file .xmodmap and the only thing i put in was:keycode 115 = Control_L
That should do it right? But when i restarted, gnome said that there was a keyboard modifier file and it would be ignorred. when i tried it, it didnt work.
How can i get this to work. it has to be possible...
-ewaldgroup :confused:
thats right - gnome complains....
forgot about mentioning u need to add
xmodmap .xmodmap
as a command to your gnome-session.
(hoary: desktop->preferrences->Session->startup...)
or you run it manually from either Applications->run Application or from Terminal.
ewaldgroup
February 2nd, 2005, 09:02 PM
thats right - gnome complains....
forgot about mentioning u need to add
xmodmap .xmodmap
as a command to your gnome-session.
(hoary: desktop->preferrences->Session->startup...)
or you run it manually from either Applications->run Application or from Terminal.
It didnt work. Ctrl still works, apple key still doesnt function as the ctrl key. Any ideas?
this is my entire .xmodmap file. it is saved in ~/.xmodmap
keycode 115 = Control_L
-ewaldgroup
t.rei
February 2nd, 2005, 09:13 PM
shouldnt matter if thats all... it doesnt have to remap all the keys.
as long as thats definately 115 = apple-key it should work. running xmodmap .xmodmap in console give any errors?
I set up my powerbook like this: 105key generic, de_DE (nodeadkeys).
then I just execute the file as seen above. running xmodmap ~/.xmodmap
everything works like a charm
ewaldgroup
February 2nd, 2005, 11:51 PM
Ok. i did what you said and checked xev. I dont know where the logs are for xmodmap.
both the ctrl key and apple key say this in the output:
(keysym 0xffe3, Control_L)
The problem is that only the Ctrl key works like it should. The apple key doesnt do that same thing as the output should imply.
What am i doing wrong?
-ewaldgroup
t.rei
February 3rd, 2005, 01:04 PM
Ok. i did what you said and checked xev. I dont know where the logs are for xmodmap.
both the ctrl key and apple key say this in the output:
(keysym 0xffe3, Control_L)
The problem is that only the Ctrl key works like it should. The apple key doesnt do that same thing as the output should imply.
What am i doing wrong?
-ewaldgroup
how about trying the program "xkeycaps" - you can pick a keyboard layout and see if the keys are reponding and what function they have. :)
I use pc105 - German and saved my basic .xmodmap this way. hope that helps you get closer
ewaldgroup
February 3rd, 2005, 02:08 PM
I tried xkeycaps but i cant find a keyboard thats close to the apple ibook 2001 keyboard. pc105, is it close?
i cant believe that no one has tried mapping the Ctrl key to the Apple Key.
Thanks,
ewaldgroup
t.rei
February 3rd, 2005, 03:57 PM
I tried xkeycaps but i cant find a keyboard thats close to the apple ibook 2001 keyboard. pc105, is it close?
i cant believe that no one has tried mapping the Ctrl key to the Apple Key.
Thanks,
ewaldgroup
the layout doesnt match my keyboard either. But all important keys react on input - so I just use it as a base. *g*
adamw
February 3rd, 2005, 09:20 PM
am using xmodmap (gives a warning when starting gnome once) but it gives you full control over your keaboard via a simple text-config-file
this is mine (powerbook g4 - german keyboard with some extras. Apple-Key== AltGR for me.
saved as .xmodmap in ~/ and executed by xmodmap .xmodmap
I just tried your mappings. On an English keyboard you need to switch the y and z keys, in addition to the semicolon, minus key, etc. etc. etc.
ewaldgroup
February 3rd, 2005, 10:24 PM
am using xmodmap (gives a warning when starting gnome once) but it gives you full control over your keaboard via a simple text-config-file
this is mine (powerbook g4 - german keyboard with some extras. Apple-Key== AltGR for me.
saved as .xmodmap in ~/ and executed by xmodmap .xmodmap
I just tried your mappings. On an English keyboard you need to switch the y and z keys, in addition to the semicolon, minus key, etc. etc. etc.
So this says that you succesfully mapped the ctrl key to the apple key. If this is true can you please include your entire .xmodmap file in your next post.
thanks,
ewaldgroup
adamw
February 4th, 2005, 10:11 PM
So this says that you succesfully mapped the ctrl key to the apple key. If this is true can you please include your entire .xmodmap file in your next post.
thanks,
ewaldgroup
I tried his mappings but I didn't try switching the command and control keys, no. I was trying to switch the F12 and F3 keys but that didn't work. What xmodmap DID do with his configuration was map my keyboard to a german keyboard, which was not useful to me. The reason I was experimenting with xmodmap was to emulate the two button mouse better, but the solution I came to was to modify the /etc/sysctl.conf file as such:
dev.mac_hid.mouse_button3_keycode=126
dev.mac_hid.mouse_button2_keycode=100
which allows me to press fn-Command and fn-Option to emulate the middle and right mouse buttons. So problem solved for me. From what I can tell, xmodmap is not very good at switching key modifiers, but good at switching the internationalization of your keyboard (like the Y and Z key, for instance). During this experiment, I also discovered that powerprefs is REALLY good at destroying my entire keymapping, all the way down to the lowest level of the firmware, to which I had to zap the PMU by holding down the shift-control-command-power button on my powerbook (yikes).
ewaldgroup
February 5th, 2005, 02:10 AM
scary. Anyone else have any ideas? any other tools?
ewaldgroup
incandenza
February 5th, 2005, 04:59 AM
scary. Anyone else have any ideas? any other tools?
ewaldgroup
I believe you have to remove Control_L from the modifier keys, remap it, and then add it back. e.g. your .xmodmap file would be
remove control = Control_L
keycode 115 = Control_L
add control = Control_L
If you don't do that, it still has the old keycode for Control_L in the modifier table.
You can do 'xmodmap -pm' to see what the modifier keys are set to.
ewaldgroup
February 5th, 2005, 02:47 PM
I believe you have to remove Control_L from the modifier keys, remap it, and then add it back. e.g. your .xmodmap file would be
remove control = Control_L
keycode 115 = Control_L
add control = Control_L
If you don't do that, it still has the old keycode for Control_L in the modifier table.
You can do 'xmodmap -pm' to see what the modifier keys are set to.
Thank you so much.... It worked perfectly... :grin:
-ewaldgroup
sourcedriver
August 31st, 2006, 10:25 PM
Thank you so much.... It worked perfectly... :grin:
-ewaldgroup
yes thank you this worked for me also! :D
However.. I have noticed that the apple key does not emulate the control key when I am trying to access the menus of Firefox. :( It works to access the menus of other gui based apps that came with Ubuntu.
How is Firefox different? :?:
Dirk.R.Gently
February 8th, 2008, 07:33 PM
thanks alot :) :) :)
vBulletin® v3.8.0 Release Candidate 2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.