Apple Keyboard with OpenSolaris

I use Macs most of the time so when at my OpenSolaris workstation, I'd like to use one of my spare Apple keyboards for a consistent experience. This almost works without any modification. However, the left Command/Apple key is not interpreted as "Alt" by OpenSolaris. Thankfully I found this thread which describes a workaround using xmodmap(1) and xev(1). The latter is a little X graphical app that shows you all X events sent to a window. Using this, I found that the keycode for the Command/Apple key is 115. Using xmodmap, I can now map this key to "Alt" with the following commands:

% xmodmap -e 'clear Mod4'
% xmodmap -e 'keycode 115 = Alt_L' 

To make this permanent, I simply put these two commands into a script (e.g. $HOME/bin/apple_keyboard.sh) and add it as a new startup program (System -> Preferences -> Sessions -> Add).

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Doug Simon

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today