RSS

Sun Microsystems Type 6 USB keyboard, Ubuntu GNU/Linux, Emacs and flexibility

27 Oct

It was time for a better keyboard because the one I plugged to my Lenovo 3000 N100 laptop was an IBM keyboard with a very strange layout, putting the PgDn, PgUp, Home, End and Ins keys in very strange places. The situation was no more bearable. Going around the university halls I met a Sun Type 6 keyboard who was sitting silently on a desk, nobody making use of it, so I genlty borrowed this little treasure.

The feel of the keys are not bad and the layout is very close to what I may call standard PC keyboard layout. However, this one being from Sun Microsystems had some extra keys. That would not bother me had Sun not decided to make the Alt keys smaller and place it to the on the left of left Super key and right of right Super key. Those Super keys (with black diamond shapes on them) were a great annoyance for a person who used Emacs, thus Alt keys very frequently. I needed a solution to be able to use those big and comfortable keys as Alt, or, to use the correct Emacs terminology, Meta keys.

The solution for Ubuntu GNU/Linux was xmodmap and a suitable .xmodmap configuration file:


!
! Swap Caps_Lock and Control_L
!
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

! make the Super_L and Super_R as the Alt keys
! on the Sun Microsystems keyboard
keycode 115 = Alt_L
keycode 116 = Alt_R

And in order to automate things I placed the following lines in my ~/.bash_profile file:


xmodmap ~/.xmodmap

which completed the operation. Now I have a nice Sun keyboard whose Super keys are mapped to Alt. The Ctrl – Caps Lock swapping functionality comes as a bonus with that configuration (it seems to be so frequently done that the man page includes an example showing how to do it! ;-))

PS: I have used the xev utility to learn the keycodes of those Super keys.

Advertisements
 
8 Comments

Posted by on October 27, 2008 in Emacs

 

8 responses to “Sun Microsystems Type 6 USB keyboard, Ubuntu GNU/Linux, Emacs and flexibility

  1. Volkan YAZICI

    October 27, 2008 at 14:20

    Caps_Lock ile Control_R’yi değiştirmem, klavye kullanım verimimi — emacs’e geçişimden sonraki — en çok arttıran ikinci olay olmuştur.

    Bu arada, emacs’te yaşadığım pc105 (turkish q) klavyedeki “ctrl:swapcaps” problemine[1] ise hala bir çözüm bulamayışım beni ayrıca üzmekte. Merak ettiğim bu sorunu pc105 üzerinde başka yaşayanların da olup olmadığı.

    [1] http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=182

     
  2. Emre Sevinc

    October 30, 2008 at 00:22

    Bu son sürüm Emacs’ta mı var sadece yoksa eski sürümlerde de mi?

    (Blog girdisi ile ilgili olarak: Bir sonraki aşama Firefox’ta Emacs kısayollarını kullanmak olacak sanırım (hala deneyemedim ilgili Firefox plug-in’ini, bir de linklere birer sayı atayıp kestirme yoldan linklere klavye ile tıklama imkanı sunan bir plug-in vardı sanırım).

    Not: Makinanınızı acilen kullanmak system admin.ininize gerekli açıklamaları yapmayı unutursanız bir süre feci rahatsız olabiliyor :-p)

     
  3. Cristian

    November 10, 2008 at 12:43

    I am using the Ubuntu 8.10 and on my Sun Type 6 it does not recognize the Super_ keys. I have seen that in this the 8.10 version the HAL has taken the job of dealing with the keyboard because in my xorg.conf all is commented out… So xev does not see the Super_ keys, and it does not see the volume keys. The volume keys work ok… I know the associated keycodes: 133 for Super_L and 134 for Super_R. In the beginning it could see only the Super_R but then I changed with xmodmap and now nothing.

    Can you give me some advice?!

    thank you.

     
  4. Emre Sevinc

    November 13, 2008 at 16:24

    Christian,

    Were you able to solve your problem?

     
  5. William Santos

    August 7, 2009 at 03:34

    Good evening everybody!!! Sorry my english! My brother in law won a keyboard , but we not install it wiyh all functions and simbols in the windows vista . So how can i do this , and i not put interrogation point e.g. . Thanks a lot and see you soon.

     
  6. William Santos

    August 7, 2009 at 03:39

    Sorry, I forgot of mentioned that type the keyboard is Sun micro sistems type 6. Thanks a lot. bye

     
  7. Michael

    May 21, 2010 at 21:50

    You do realise that those black diamond keys *are* the meta keys, and that on Sun systems Alt and Meta are separate? Microsoft reused those keys for its “Windows” keys, and X11 on PCs assumes that you are using a Microsoft keyboard and not a Sun one and renames them to “Super” to avoid mentioning the Other System.

     

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: