PC keyboard layout.

Struggling with Fuse or trying to find an emulator with a specific feature. Ask your questions here.
Post Reply
Nomad
Manic Miner
Posts: 600
Joined: Thu Dec 28, 2017 12:38 pm

PC keyboard layout.

Post by Nomad »

Ok this might come as a shock, but I don't have a spectrum keyboard.

I also don't have the best short term memory - so remembering keybindings is a pain :lol: What I want to do is use fuse or any spectrum emulator with the same layout as my PC keyboard. No remembering obscure keybindings from a keyboard I no longer have. No referring to a keyboard layout guide the size of a postage stamp..

I just want to use the input device I have in front of me to use the application. I am cool not having the token table shortcuts...

Is there not a way to do this?

I can't have been the first person to find this issue. :lol:

I just want what I type on my keyboard to come out the same way in the application. That goes for characters like !@#$%^&*() all mapping to the same key that I press on the actual keyboard.

It would seem this would be a basic thing to have the input device map to the application? Or am I taking crazy pills? Ok I take the point the original hardware worked by mapping tokens but we have a choice to emulate the tape or not right? so why not have that same sort of choice for the way you type stuff into the machine itself?
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: PC keyboard layout.

Post by Ast A. Moore »

That wouldn’t be trivial, as you’d have to deal with the modifier keys. You see, mapping something like the double-quote is easy (and, in fact, Fuse already does that), because that key isn’t present as a separate switch on the Spectrum. The exclamation point is tough, as it shares the “1” key, which is present on both keyboards. The Shift key is also shared, so how would the emulator know what you’re trying to enter—an exclamation point or execute the EDIT command on the Spectrum?

As a partial workaround, one could swap the mapping of the SYMBOL SHIFT and CAPS SHIFT keys, but then you’ll have the exact same problem with another subset of symbols. Fuse at least lets you enter some of them in a familiar fashion.
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
Ralf
Rick Dangerous
Posts: 2279
Joined: Mon Nov 13, 2017 11:59 am
Location: Poland

Re: PC keyboard layout.

Post by Ralf »

But it will never be the same. Spectrum keyboard had all these symbols and Basic commands written on its keys. PC keyboard doesn't have it so you have to remember it or check in some docs.

From my experience I can recommend you Spectaculator as maybe the most friendly emulator for typing stuff (and other things too).

I'm writing from memory but I believe in Spectaculator you type " on PC keyboard and you get " in Spectrum.

With other emulators you must do it just like on Spectrum so it would be Symbol Shift+P on Spectrum and Shift+P or Alt+P on PC, depending on your emulator.

There is also built-in help showing you the keyboard layout.
User avatar
Seven.FFF
Manic Miner
Posts: 735
Joined: Sat Nov 25, 2017 10:50 pm
Location: USA

Re: PC keyboard layout.

Post by Seven.FFF »

If you have access to a vinyl cutting plotter in a local print shop, then you can get some of these stickers printed. Or ask in the Uno forums if somebody has a spare set for sale.

http://zxuno.speccy.org/ficheros/Etique ... OK_v15.pdf

The Uno does its own mapping for ps/2 keyboards, so it may not be a perfect match for every key, but it should cover the main offenders.
Robin Verhagen-Guest
SevenFFF / Threetwosevensixseven / colonel32
NXtel NXTP ESP Update ESP Reset CSpect Plugins
zx81
Microbot
Posts: 138
Joined: Sat Feb 17, 2018 9:33 pm

Re: PC keyboard layout.

Post by zx81 »

Nomad wrote: Fri Mar 09, 2018 11:39 am Ok this might come as a shock, but I don't have a spectrum keyboard.

I also don't have the best short term memory - so remembering keybindings is a pain :lol: What I want to do is use fuse or any spectrum emulator with the same layout as my PC keyboard. No remembering obscure keybindings from a keyboard I no longer have. No referring to a keyboard layout guide the size of a postage stamp..

I just want to use the input device I have in front of me to use the application. I am cool not having the token table shortcuts...

Is there not a way to do this?

I can't have been the first person to find this issue. :lol:

I just want what I type on my keyboard to come out the same way in the application. That goes for characters like !@#$%^&*() all mapping to the same key that I press on the actual keyboard.

It would seem this would be a basic thing to have the input device map to the application? Or am I taking crazy pills? Ok I take the point the original hardware worked by mapping tokens but we have a choice to emulate the tape or not right? so why not have that same sort of choice for the way you type stuff into the machine itself?
JSpeccy have a keyboard mode that maps the PC keys to Spectrum keys. Isn't perfect, but near to your wishes... :D
Magnus
Dizzy
Posts: 61
Joined: Sat Jan 06, 2018 6:47 am
Location: Sweden

Re: PC keyboard layout.

Post by Magnus »

I have tried to adapt my emulator for Swedish and UK keyboards so that you don't have to remember the Spectrum keyboard layout. Actually, I haven't been able to test the UK keyboard layout myself so if anyone would like to give it a try and report back to me I would be grateful. Here is how it works (or should work ;) ):
  • LEFT SHIFT on the PC keyboard is mapped to the Spectrum CAPS SHIFT.
  • CTRL on the PC keyboard is mapped to SYMBOL SHIFT.
  • ESCAPE on the PC keyboard toggles the Spectrum Extended mode.
  • The PC arrow keys are mapped to the Spectrum Kempston joystick interface.
  • The M and B keys on the PC keyboard are mapped to Spectrum Kempston joystick interface FIRE button.
  • LEFT SHIFT + arrow keys on the PC keyboard are mapped to the keys 5-8 (arrow keys) on the Spectrum.
  • Using RIGHT SHIFT on the PC keyboard, most special characters on the PC keyboard are mapped to their Spectrum counterparts. So, using RIGHT SHIFT you would get !"£ etc. on the upper numeric keys and so on.
  • Unshifted special characters on the PC keyboards like ,. and ; are mapped directly to the Spectrum.
My ZX Spectrum emulator project: https://softspectrum48.weebly.com.
User avatar
RMartins
Manic Miner
Posts: 776
Joined: Thu Nov 16, 2017 3:26 pm

Re: PC keyboard layout.

Post by RMartins »

If I was developing an emulator, that uses a PC keyboard, I would use the following 2 facts:

1 - Spectrum, only had 2 special keys, CAPS-SHIFT and SYMBOL-SHIFT, that were on the left and right, respectively of the 48K Keyboard.
2 - A PC Keyboard always has 2 CTRL, ALT and SHIFT keys

So if we use CTRL or ALT or SHIFT keys that are in the same position as the 48K keyboard, implement as if we are controlling the Spectrum Key directly.

If we use CRTL or ALT or SHIFT on the opposite side of the 48K keyboard, would work as regular PC keys.

This would allow to support both systems simultaneously.
Post Reply