Some further comments.
First off, most applications can be set up with their own meanings for the numeric pad keys (or any other keys, for that matter). Older applications, like xterm, use the Intrinsics translation mechanism. Newer applications use different mechanism; KDE's konsole, for example, uses a key table (various key tables can be found in <KDE>/share/apps/konsole/). Gnome applications presumably have their own mechanism; I don't use Gnome apps that much, though, so I'm not familiar with them.
However, the solution (hack!) I gave changes the numeric keypad for *everything*.
For reference, the default Sun Solaris [XSun] keypad map looks like:
Code: Select all
keycode 53 = F25 F25 KP_Divide
keycode 54 = F26 F26 KP_Multiply
keycode 57 = Delete Delete KP_Decimal
keycode 75 = F27 F27 KP_7 Home
keycode 76 = Up F28 KP_8
keycode 77 = F29 F29 KP_9 Prior
keycode 78 = KP_Subtract
keycode 97 = KP_Enter
keycode 98 = Left F30 KP_4
keycode 99 = F31 F31 KP_5
keycode 100 = Right F32 KP_6
keycode 101 = KP_Insert KP_Insert KP_0
keycode 119 = F33 F33 KP_1 End
keycode 120 = Down F34 KP_2
keycode 121 = F35 F35 KP_3 Next
keycode 132 = KP_Add
An interesting thing to note about this keyboard is that the shifted keys are, technically,
neither the number nor the control. Sun's keyboard mappings are wierd in general, though. (For example, F11 is not F11 but SunF35; this is because F11 didn't exist on early Sun keyboards, so it was assigned to a key labeled Stop on the left side of the Sun keyboard).
The standard XFree86 US XKB layout is:
Code: Select all
symbols/us: key <KPDV> { [ KP_Divide ] };
symbols/us: key <KPMU> { [ KP_Multiply ] };
symbols/us: key <KPSU> { [ KP_Subtract ] };
symbols/us: key <KP7> { [ KP_Home, KP_7 ] };
symbols/us: key <KP8> { [ KP_Up, KP_8 ] };
symbols/us: key <KP9> { [ KP_Prior, KP_9 ] };
symbols/us: key <KPAD> { [ KP_Add ] };
symbols/us: key <KP4> { [ KP_Left, KP_4 ] };
symbols/us: key <KP5> { [ KP_Begin, KP_5 ] };
symbols/us: key <KP6> { [ KP_Right, KP_6 ] };
symbols/us: key <KP1> { [ KP_End, KP_1 ] };
symbols/us: key <KP2> { [ KP_Down, KP_2 ] };
symbols/us: key <KP3> { [ KP_Next, KP_3 ] };
symbols/us: key <KPEN> { [ KP_Enter ] };
symbols/us: key <KP0> { [ KP_Insert, KP_0 ] };
symbols/us: key <KP0> { [ KP_Insert, KP_0 ] };
symbols/us: key <KPDL> { [ KP_Delete, KP_Decimal ] };
VNC (Xnvc) does not have a keypad setup.
Thus, a generic, fully portable, set of xmodmap files would be as follows. These files will work on any server at all, including the Sun Solaris server, XFree86 (any version) and VNC.
set numeric mode:
Code: Select all
! Ensure that we have all keysyms we're going to use assigned to something.
keycode any = KP_Insert
keycode any = KP_End
keycode any = KP_Down
keycode any = KP_Next
keycode any = KP_Left
keycode any = KP_Right
keycode any = KP_Home
keycode any = KP_Up
keycode any = KP_Prior
keycode any = KP_Delete
! Set the keypad to numeric mode.
! You may need to adjust KP_Next/KP_Prior; possible alternatives
! are KP_Page_Down/KP_Page_Up or just Next/Prior.
! just Next.
keysym KP_Insert = KP_0
keysym KP_End = KP_1
keysym KP_Down = KP_2
keysym KP_Next = KP_3
keysym KP_Left = KP_4
keysym KP_Right = KP_6
keysym KP_Home = KP_7
keysym KP_Up = KP_8
keysym KP_Prior = KP_9
keysym KP_Delete = KP_Decimal
set control mode:
Code: Select all
! Ensure that we have all keysyms we're going to use defined.
keycode any = KP_0
keycode any = KP_1
keycode any = KP_2
keycode any = KP_3
keycode any = KP_4
keycode any = KP_6
keycode any = KP_7
keycode any = KP_8
keycode any = KP_9
keycode any = KP_Decimal
! Set the keypad to control mode.
! You may need to adjust KP_Next/KP_Prior; possible alternatives
! are KP_Page_Down/KP_Page_Up or just Next/Prior.
! just Next.
keysym KP_0 = KP_Insert
keysym KP_1 = KP_End
keysym KP_2 = KP_Down
keysym KP_3 = KP_Next
keysym KP_4 = KP_Left
keysym KP_6 = KP_Right
keysym KP_7 = KP_Home
keysym KP_8 = KP_Up
keysym KP_9 = KP_Prior
keysym KP_Decimal = KP_Delete
Default mode:
Code: Select all
! Ensure that we have all keysyms we're going to use defined.
keycode any = KP_0
keycode any = KP_1
keycode any = KP_2
keycode any = KP_3
keycode any = KP_4
keycode any = KP_6
keycode any = KP_7
keycode any = KP_8
keycode any = KP_9
keycode any = KP_Decimal
! Set the keypad to normal (Num Lock controled) mode.
! You may need to adjust KP_Next/KP_Prior; possible alternatives
! are KP_Page_Down/KP_Page_Up or just Next/Prior.
! just Next.
keysym KP_0 = KP_Insert KP_0
keysym KP_1 = KP_End KP_1
keysym KP_2 = KP_Down KP_2
keysym KP_3 = KP_Next KP_3
keysym KP_4 = KP_Left KP_4
keysym KP_6 = KP_Right KP_6
keysym KP_7 = KP_Home KP_7
keysym KP_8 = KP_Up KP_8
keysym KP_9 = KP_Prior KP_9
keysym KP_Decimal = KP_Delete KP_Decimal
[edit: fixed syntax error, corrected 'keysym any' to 'keycode any']