Modifying the Keyboard
This appendix describes how to remap options for special keyboard keys and how to disable and enable the Compose key on your keyboard.
For information on remapping your mouse buttons (for example, more convenient left-handed use of the mouse), see the user documentation for your desktop environment.
Disabling and Enabling the Compose Key
IA only - The Compose key is defined to be Ctrl-Shift-F1 on IA-based systems.
If you do not use the Compose key, you can disable it so that you do not press it inadvertently. First, find out the keycode for Multi_key:
$ xmodmap -pk | grep Multi_key |
Your system displays a line similar to:
nn 0xff20 (Multi_key)
Use the two-digit keycode number at the beginning of the line, represented by nn, to construct the following line in your .xinitrc file.
xmodmap -e 'keycode nn = NoSymbol' |
To re-enable the Compose key, comment out the previous line in your .xinitrc file and restart the OpenWindows software.
SPARC: Left-Handed Key Remapping
The key remapping script in this section (provided for the Type-4 and Type-5 keyboards) remaps most of the special keys on the left panel and right panel of the keyboard (that is, the keypads to the left and right of the main keyboard area).
SPARC only - Note the following sections that describe "Left-Handed Key Remapping" apply only to SPARC-based machines.
SPARC: Using the Remapping Script
To remap the special keys on the left panel and right panel of your keyboard, follow these steps.
Create a file called lefty.data by using any text editor.
This file can be in any directory. Step 4 must occur in the same directory in which you create this file.
Type in the script as shown in "lefty.data Script".
Any line with an exclamation point in front of it is a comment line, and does not execute any operation.
Save the changes and quit the editor.
At the prompt, type:
$ xmodmap lefty.data
Note - You must be in the same directory as the script file.
Click a mouse button in the Workspace to make the script effective.
The keyboard is now remapped for left-handed use.
lefty.data Script
Type the following script into the file lefty.data, as described in Step 2.
SPARC: Undoing the Keyboard Remapping
You can switch the keys back to their original settings in the following ways.
Exit the Solaris operating environment and start it up again
Create a second script and initiate it any time you want to switch back
Follow these instructions to create the second script.
Use a text editor to create a file called nolefty.data.
Type in the script as shown in "nolefty.data Script"
Any line with an exclamation point in front of it is a comment line, and does not execute any operation.
Save the nolefty.data script in the same directory as the lefty.data script and quit the editor.
At the prompt, type the following command.
$ xmodmap nolefty.data
Note - For the nolefty.data file to execute, you must type the previous command in the same directory as the script file.
nolefty.data Script
IA: Function Key and Control Key Remapping
You can remap the function keys of an IA machine so that they function like the Help, Cut, Copy, Paste, Undo, and Front keys on a SPARC keyboard. You can also remap the right Control key to be a Meta key.
IA only - Note that the following sections describing "Function Key Remapping" apply only to IA machines. After you remap the keys, you cannot use kdmconfig to change setup or video information without first undoing the keyboard remapping.
IA: Using the Remapping Script
Follow these steps to create and use your remapping script:
Create a file in your home directory that is called fkeys by using any text editor.
Type in the script as shown in "fkeys Script".
Save the changes and quit the editor.
At the prompt, type the following command.
$ xmodmap fkeys
Note - You must be in the same directory as the script file.
Click a mouse button in the Workspace to make the script effective.
After you complete these steps, you can use the function keys as Help, Cut, Copy, Paste, Undo, and Front keys.
fkeys Script
! keysym F2 = L10 keysym F3 = L6 keysym F4 = L8 keysym F5 = L9 keysym F8 = L4 keysym F9 = L5 remove control = Control_R keycode 0x47 = Meta_R add mod1 = Meta_R |
IA: Undoing the Keyboard Remapping
You can switch the keys back to their original settings in two ways.
Exit the Solaris operating environment and start it up again
Create a second script and initiate it any time you want to switch back
Follow these instructions to create the second script:
Use a text editor to create a file called normal.
Type the script as shown in "normal Script".
Save the normal file in the same directory as the fkeys script and quit the editor.
At the prompt, type:
$ xmodmap normal
Note - You must type the previous command in the same directory as the script file.