userinput.md 8.8 KB

User Input

Gamepad

The first gamepad's buttons and joysticks are mapped to the keyboard, they are working simultaniously. For example it doesn't matter if you press Ⓧ on the controller, or X on the keyboard, in both case both gamepad button flag and keyboard state flag will be set. The mapping can be changed by writing the keyboard scancodes to MEG-4's memory, see [memory map] for details. The default mapping goes like cursor arrows are the directions ◁, △, ▽, ▷; the Space is the primary button Ⓐ, C is the secondary button Ⓑ and X is Ⓧ, Z is Ⓨ. The Konami Code is working too (see KEY_CHEAT scancode).

Pointer

Coordinates and button pressed states can be easily accessed from the MEG-4's memory. Scrolling (both vertical and if supported, horizontal) handled as if your mouse had up / down or left / right buttons.

Keyboard

For convenience, it has several shortcuts and multiple input methods. All characters required for programming can be accessed with an Alt combination, regardless what keyboard layout the platform is using:

Left Alt combinations

UNICODE Codepoint Mode

In this mode you can enter hex numbers (0 to 9 and A to F). Instead of these separately pressed keys, the codepoint they describe will be added as if your keyboard had that key. For example the sequence GUI, 2, e, ⏎Enter will add a . dot, because codepoint U+0002E is the . dot character.

NOTE: Only the Basic Multilingual Plane (U+00000 to U+0FFFF) supported, with some exceptions for the emoticons range starting at U+1F600. Other codepoints will be simply skipped.

This mode automatically quits after the character is entered.

Compose Mode

In compose mode you can add acute, umlaut, tilde etc. to the characters. For example the sequence AltGr, a, ' will add á, or AltGr, s, s will add ß, and another example, AltGr, c, , will add ç, etc. You can use Shift in combination with the letter to get the uppercase variants.

This mode automatically quits after the character is entered.

Icon Mode

In icon mode you can add special icon characters, representing the emulator's input (like the sequence Alt+I, m will add the 🖱 mouse icon, and Alt+I, a will add the icon of the gamepad's button) as well as emoji icons (like Alt+I, ;, ) will add the character 😉, or Alt+I, <, 3 will produce ).

This mode automatically quits after the character is entered.

Katakana and Hiragana Modes

Similar to icon mode, but here you can type the Romaji letters of pronounced sound to get the character. For example the sequence Alt+K, n, a, n, i, k, a is interpreted as three sounds, and therefore will add the three characters ナニヵ. Also, punctation works as expected, for example Alt+K, . will produce Japanese full stop character .

You can use Shift in combination with the first letter to get the uppercase variants, for example Alt+K, Shift+s, u will produce and not .

This mode remains active after the character is entered, press Esc to return to normal input mode.

Cyrillic Mode

It is based on KOI8-RU, but some letters are mapped to number and symbol keys. For example Alt+C, Shift+l, e, n, i, n will produce the characters Ленин.

This mode remains active after the character is entered, press Esc to return to normal input mode.

Greek Mode

Tries to be phonetically correct, but there's no one-to-one mapping with the Latin alphabet. For example Alt+G, Shift+p, l, a, t, o n, will produce the characters Πλατων.

This mode remains active after the character is entered, press Esc to return to normal input mode.

NOTE: This feature is implemented using data tables, new combinations can be added to src/inp.c any time without coding skills.

Key Combination Description
GUI Or Super, sometimes has a logo on it. UNICODE codepoint input mode.
AltGr The right Alt key, activates Compose mode when pressed alone.
Alt+U In case your keyboard lacks the GUI key, UNICODE input mode too.
Alt+Space Fallback Compose, for keyboards without the AltGr key.
Alt+I Enter icon (emoticons) input mode.
Alt+G Enter Greek input mode.
Alt+J Enter Hiragana input mode.
Alt+K Enter Katakana input mode.
Alt+C Enter Cyrillic input mode.
Ctrl+S Save floppy.
Ctrl+L Load floppy.
Ctrl+R Run your program.
Ctrl+⏎Enter Toggle fullscreen mode.
Ctrl+A Select all.
Ctrl+I Invert selection.
Ctrl+X Cut, copy to clipboard and delete.
Ctrl+C Copy to clipboard.
Ctrl+V Paste from clipboard.
Ctrl+Z Undo.
Ctrl+Y Redo.
F1 Built-in help pages (the API Reference in this manual, see [interface]).
F2 [Code Editor]
F3 [Sprite Editor]
F4 [Map Editor]
F5 [Font Editor]
F6 [Sound Effects]
F7 [Music Tracks]
F8 [Memory Overlays] Editor
F9 [Visual Editor]
F10 [Debugger]
F11 Toggle fullscreen mode.
F12 Save screen as meg4_scr_(unix timestamp).png.