When playing a game such as PC-8801 or PC-9801 with the emulator, if the keymap of the arrow keys is assigned to 2, 4, 6 and 8 of the numeric keypad, play the game on a laptop computer without the numeric keypad I'm in trouble when I do it. So, this time, I will introduce how to make the arrow keys of the laptop computer correspond to the numeric keypad 2, 4, 6 and 8 using xmodmap.
xnp2m.sh
#!/bin/bash
(cd ~xnp2; xmodmap xmodemapm; xnp2; xmodmap xmodemapn ) &
Here, it is assumed that the PC-9801 emulator xnp2 is in the directory ~ / xnp2.
Copy the following keymap and put it in ~ / xnp2 as xmodemapm, xmodemapn.
!xmodemapm (xmodmap modified)
keycode 111 = KP_8 KP_8 KP_8 KP_8
keycode 113 = KP_4 KP_4 KP_4 KP_4
keycode 114 = KP_6 KP_6 KP_6 KP_6
keycode 116 = KP_2 KP_2 KP_2 KP_2
!xmodemapn (xmodmap normal)
keycode 111 = Up NoSymbol Up
keycode 113 = Left NoSymbol Left
keycode 114 = Right NoSymbol Right
keycode 116 = Down NoSymbol Down
Then, give execute permission to xnp2m.sh and execute it to start the emulator. The keyboard map of the machine remains changed while the emulator is running, but when you exit the emulator, the keymap is automatically restored.
Recommended Posts