Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bracket keys not working #44

Closed
diogoeichert opened this issue Jul 16, 2017 · 14 comments
Closed

Bracket keys not working #44

diogoeichert opened this issue Jul 16, 2017 · 14 comments

Comments

@diogoeichert
Copy link

I'm running CocoaMSX on Sierra (10.12.5) and none of the brackets are working, either the normal square brackets nor the curly brackets by holding shift. Tried with different software.

@0xe1f
Copy link
Member

0xe1f commented Jul 17, 2017

Is it that you can't configure the square bracket key to act as a particular MSX key (in Preferences), or that pressing the square bracket on your Mac doesn't register as a square bracket in the emulated machine?

Different systems use different keyboard layouts, and depending on system, the Mac's square bracket key may not map to a square bracket (or curly) on a particular MSX system (e.g. Cyrillic systems).

Please clarify what you're experiencing.

@diogoeichert
Copy link
Author

With keyboard settings untainted (I checked that [ is mapped to [) when I hit [ on the keyboard, nothing happens on the emulated MSX. I have just tested every key in the keyboard, and there are other keys which are not working: ;, ' and ~. The host Mac has a standard U.S. keyboard with default settings.

@0xe1f
Copy link
Member

0xe1f commented Jul 17, 2017

Which system are you emulating (should be shown in Preferences)? Can you try pressing "]" with a Sony HB-F1XD running?

@diogoeichert
Copy link
Author

I was running the default C-BIOS. With the Sony HB-F1XD [ prints @ and ] prints [ though in the keyboard settings [ is still mapped to [ but at least the keys are responding now. I have tried other systems and they give different results but these keys always seem to be different from what expected.

@0xe1f
Copy link
Member

0xe1f commented Jul 17, 2017

CocoaMSX maps keys by using the placement of the keys as a guideline. In other words, "[" appears to have different functionality on system A vs system B, because each system has a different key in that particular physical location (usually due to regional settings).

Because C-BIOS doesn't include BASIC, mapping of non-alpha keys has not been an issue with C-BIOS. What ROM are you using to determine whether or not [] work?

@diogoeichert
Copy link
Author

First I was trying C-BIOS with Hot-Logo (Brazilian Portuguese counterpart of MSX-Logo), then when you suggested the HB-F1XD system I tried it both with Logo and the resident BASIC. Same results were obtained with both Logo and BASIC.

@0xe1f
Copy link
Member

0xe1f commented Jul 17, 2017

This is an issue between C-BIOS and the ROM, not the emulator itself. CocoaMSX is generating the events to produce key up/key down - either C-BIOS (most likely) or HotLogo are ignoring it. Solution is to use another system - C-BIOS was mostly intended to play ROMs anyway.

@diogoeichert
Copy link
Author

Well, it's definitely not related to Hot-Logo, since the issue happens in BASIC, too. But I do have some good news, I've tested a few more systems and I have found at least two that just work out of the box with the standard U.S. keyboard of the Mac: the Philips VG-8000 and the Gradiente Expert XP-800. The latter even works with Hot-Logo, which apparently requires some Portuguese support for even booting.

Perhaps I'm just lucky that these system are probably wired in the same way modern keyboards are. But what if we had an additional abstraction layer in the emulator input subsystem in order to correctly map the keys for every MSX system? I've noticed that some keys are tricky even between the English language systems.

@0xe1f
Copy link
Member

0xe1f commented Jul 17, 2017

CocoaMSX actual does perform some mapping - specifically to display keyboard layout info and perform pasting. However, from what I can tell, the issue here is that the keys are ignored by the ROM - either because of the ROM itself or C-BIOS. Neither of those things are something that falls within the emulator's purview to fix.

@diogoeichert
Copy link
Author

I see. OK then, try to ignore C-BIOS and the ROM for this: even if I run the Sony HB-F1XD with no ROM inserted and vanilla settings those keys don't work out of the box. Do you think there could be some additional layer here? Maybe some collection of per-system key maps?

@0xe1f
Copy link
Member

0xe1f commented Jul 17, 2017

With HB-F1XD, "~" (Mac) maps to "]" (MSX) and "]" (Mac) maps to "[" (MSX). If that doesn't work out, you can always reconfigure/remap via Preferences.

Given the number of systems available, and the fact that MSX/modern keyboard layouts don't really align, doing per-system mapping would be too much of a chore.

@diogoeichert
Copy link
Author

Well, that's strange, because the key map under Preferences says [ is mapped to [ but when I type [ it shows a @. Maybe I'm missing something here?

I know maintaining per-system key maps is a huge chore and I don't think that should be a one-person task. But maybe if some kind of key map files were supported by the emulator, the community could gradually work on these map files.

I see the systems under Machines already contain a config.ini file each. Maybe a new section, say [Keymap] could be enough to do the trick?

Those automatically downloaded system .zip file are pretty neat, by the way. Are they already maintained by the community somehow?

@0xe1f
Copy link
Member

0xe1f commented Jul 19, 2017

Those automatically downloaded system .zip file are pretty neat, by the way. Are they already maintained by the community somehow?

Yes, @mars2000you maintains the machine list - it's the same set as blueMSX (on which CocoaMSX is based)

@0xe1f
Copy link
Member

0xe1f commented Jul 30, 2017

Reopening, since the C-BIOS team has fixed the issue.

@0xe1f 0xe1f reopened this Jul 30, 2017
@0xe1f 0xe1f closed this as completed in 201c80c Aug 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants