LINUX: How to make arrow keys correspond to 2,4,6,8 on a notebook without a numeric keypad

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

LINUX: How to make arrow keys correspond to 2,4,6,8 on a notebook without a numeric keypad
How to install Linux on a 32bit UEFI PC
How to build a Python environment on amazon linux 2
How to use GitHub on a multi-person server without a password
A memo on how to easily prepare a Linux exercise environment
How to make a multiplayer online action game on Slack
How to make a hacking lab-Kali Linux (2020.1) VirtualBox 64-bit Part 2-
How to make a hacking lab-Kali Linux (2020.1) VirtualBox 64-bit edition-
How to make a Japanese-English translation
How to install VMware-Tools on Linux
How to make a crawler --Advanced
How to make a recursive function
How to make a deadman's switch
[Blender] How to make a Blender plugin
How to make a crawler --Basic
How to make a .dylib library from a .a library on OSX (El Capitan)
[Python] How to make a class iterable
How to make a process thread run only on a specific CPU core
Make Jupyter Notebook a service on CentOS
Make Unity Accelerator a service on Linux
How to update php on Amazon linux 2
How to display emoji on Manjaro Linux
How to set up a jupyter notebook on ssh destination (AWS EC2)
How to install packages on Alpine Linux
How to install Anisble on Amazon Linux 2
How to update security on CentOS Linux 8
How to install php7.4 on Linux (Ubuntu)
How to make a Backtrader custom indicator
How to test on a Django-authenticated page
Verification of how to periodically execute a script on a Linux server on Windows
How to make a Pelican site map
How to find large files on Linux
How to deal with "^ [[A ^ [[B ^ [[C ^ [[D"] when you press the arrow keys when executing python on mac
How to make a dialogue system dedicated to beginners
How to make an embedded Linux device driver (11)
How to make WTForms TextArea correspond to file drop
How to make an embedded Linux device driver (8)
How to make an embedded Linux device driver (1)
How to make an embedded Linux device driver (4)
How to make multiple kernels selectable on Jupyter
How to make a dictionary with a hierarchical structure.
How to make an embedded Linux device driver (7)
How to make an embedded Linux device driver (2)
How to make an embedded Linux device driver (3)
How to make a QGIS plugin (package generation)
Try to create a new command on linux
How to create a shortcut command for LINUX
I read "How to make a hacking lab"
How to live a decent life on 2017 Windows
How to make an embedded Linux device driver (6)
How to install Camunda Modeler on Manjaro Linux
How to build Java environment on Ubuntu (Linux)
How to make an embedded Linux device driver (5)
How to make an embedded Linux device driver (10)
How to make Linux compatible with Japanese keyboard
How to make an embedded Linux device driver (9)
How to build a beautiful Python environment on a new Mac and install Jupter Notebook
How to create a Python 3.6.0 environment by putting pyenv on Amazon Linux and Ubuntu
How to make Yubico Yubikey recognized in Manjaro Linux
Specify the volume on linux and make a sound
How to use C216 Audio Controller on Arch Linux