istvan-v / ep128emu

IstvanV's great Enterprise-128 emulator imported to github
https://sourceforge.net/projects/ep128emu/
GNU General Public License v2.0
25 stars 10 forks source link

Amstrad CPC keyboard layout has wrong and missing keys. #3

Open cpcitor opened 6 years ago

cpcitor commented 6 years ago

Hello. Came here from a Amstrad CPC forum where ep128emu was mentioned. Interesting emulator indeed, with some functions I never saw like tape partial rewind etc.

Summary

Running the emulator works fine, but many keys are not mapped and some are wrongly mapped.

Not being able to easily type a quote " makes it difficult to even run any software.

System here is Ubuntu 16.04 AMD64 with french keyboard layout.

Details

Letter keys all work and conform to a translated mapping (rather than positional). Translated or positional key mapping is a matter of emulation policy and I think both are valid and best one depends on emulated application (typically: positional for games where relative positions are what matters, also positional for CPC masters who type with muscle memory instead of looking at their keyboard, translated for other cases including text entry and programming).

Local keyboard layout near-exactly matches main area of image below. PC Keyboard One difference is key is physically one row below (right of ù% instead of right of ).

For reference, CPC6128 keyboard layout: CPC keyboard

Anyway here is the result of systematic testing with my physical keyboard.

Actions attempted

Directions for improvement?

With such improvements, IMHO ep128emu has some potential for a wider user base.

What do you think? First step could be to hint me at how to get Clr, Copy, KeyPad-., F7, F8, F9 working by manually editing a ASCII keyboard configuration file.

Thanks a lot for your attention.

Additional information

Compiling from this commit:

commit 83464098133753c55172570a4034c792bdb30cea
Author: IstvanV <istvan-v@users.noreply.github.com>
Date:   2017-02-22 12:59:01 +0100
istvan-v commented 6 years ago

Hello, sorry about the late reply, there seem to be two issues, first, the keyboard emulation for the non-Enterprise machines is a translation layer that maps Enterprise keys to Spectrum, CPC and TVC keys, this would not be easy to change. Second, there is no preset configuration file for French keyboards yet, only English and Hungarian, this affects all machines and is probably the reason why there are missing keys. You can configure the keyboard layout manually (Alt + I), it is possible however that correct support for French may also require workarounds in the code.

The mapping of CPC keys to Enterprise keys is as follows:

This layout is probably not intuitive, but it should be possible to create a map where each French PC key is translated to the position wise matching CPC key. The only issue is that the numeric keyboard is used for emulating the external joysticks by default, it can be mapped to anything, however.

istvan-v commented 6 years ago

I made an attempt at creating a French CPC keyboard map, on Linux with a US keyboard switched to FR layout. This is not perfect, as I suspected, some keys do not work correctly because they are interpreted by X or FLTK in a special way.

CPC_Keyboard_FR.txt