Skip to content

machine/keyboard: add natural-keyboard control characters to generic_keyboard#15530

Open
davidlrand wants to merge 1 commit into
mamedev:masterfrom
davidlrand:generic-keyboard-natkbd-ctrl
Open

machine/keyboard: add natural-keyboard control characters to generic_keyboard#15530
davidlrand wants to merge 1 commit into
mamedev:masterfrom
davidlrand:generic-keyboard-natkbd-ctrl

Conversation

@davidlrand

Copy link
Copy Markdown
Contributor

The generic_keyboard device, used by serial terminals through
SERIAL_TERMINAL and similar, emits control codes from its emulated
keyboard but could not produce them from the natural keyboard: the Ctrl
modifier was mapped to UCHAR_MAMEKEY(LCONTROL) rather than the
natural-keyboard control modifier, and the letter keys carried no
control-code character.

Map Ctrl to UCHAR_SHIFT_2 and add the matching control code (0x01-0x1a)
as a third PORT_CHAR on each letter key, following the convention
ie15_kbd already uses. Ctrl+letter can now be typed with -natural.

Found while bringing up the National Semiconductor ICM-3216, whose
console is a generic serial terminal that needs Ctrl to reach the ROM
monitor and shell.

…keyboard

The generic_keyboard device, used by serial terminals through
SERIAL_TERMINAL and similar, emits control codes from its emulated
keyboard but could not produce them from the natural keyboard: the Ctrl
modifier was mapped to UCHAR_MAMEKEY(LCONTROL) rather than the
natural-keyboard control modifier, and the letter keys carried no
control-code character.

Map Ctrl to UCHAR_SHIFT_2 and add the matching control code (0x01-0x1a)
as a third PORT_CHAR on each letter key, following the convention
ie15_kbd already uses. Ctrl+letter can now be typed with -natural.

Found while bringing up the National Semiconductor ICM-3216, whose
console is a generic serial terminal that needs Ctrl to reach the ROM
monitor and shell.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant