MATLAB: Am I unable to use the Backspace and Enter keys over an X-Windows connection in MATLAB 7.0 (R14)

backspacecygwin;emulatorenterkeyboardlinuxMATLABnumlocksolarisxx-emulatorx-forwardingxwindows

When I run MATLAB remotely on a Unix or Linux computer, using X-Windows forwarding to display the results on my local Windows computer, I am unable to use the Backspace and Enter keys.

Best Answer

This issue has been known to occur with some X-Windows emulators when "Num Lock" is on. Turning off "Num Lock" should allow you to work around this issue.
Alternatively, if you need access to the numeric keypad functionality, you can avoid the issue by remapping your numeric keypad. This automatically turns Num Lock mode on for the remainder of the X-Windows session. The remapping affects all applications you subsequently run using the X-Windows emulator, not just MATLAB.
Follow these steps to remap your numeric keypad:
1. Create a file in your current directory that contains the following lines:
keycode 90 = KP_0 KP_Insert
keycode 87 = KP_1 KP_End
keycode 88 = KP_2 KP_Down
keycode 89 = KP_3 KP_Next
keycode 83 = KP_4 KP_Left
keycode 84 = KP_5 KP_Begin
keycode 85 = KP_6 KP_Right
keycode 79 = KP_7 KP_Home
keycode 80 = KP_8 KP_Up
keycode 81 = KP_9 KP_Prior
keycode 91 = KP_Decimal KP_Delete
Save the file, for example, as MLKeyMap.
2. To provide access to the numeric keypad functionality for the remainder of the session, run
xmodmap MLKeyMap
Note that you cannot access the non-numeric keys on the keypad until you end the X-Windows session.
After doing this, you should be able to start MATLAB and use the numeric keypad without the use of the Num Lock key.