On Tue, May 17, 2005 at 02:19:06PM +0100, Colin Piggot wrote: > Stuart Brady wrote: > > BTW, how do the PS/2 -> SAM interfaces work, WRT the keyboard > > layout? Do you just have to ignore whatever's printed on the keyboard? > > I designed my PC Keyboard Interface so it directly maps a standard UK PC > Keyboard layout to the right keys and symbols for the Sam.
Hmm, that's impressive. I'm wondering, is it possible to use the keys that the SAM doesn't have? > The key mapping is seamless, If keys are used for musical notes, and Shift is used to shift to a higher octave, then Shift-2 would really mean Shift-2 rather than double-quotes. I don't mean to be pedantic, but it can't be seamless. Of course, writing apps that work well with Dvorak is much more painful, especially when writing terminal apps, where there's no concept of a keyboard layout... For example, irssi uses Q, W, E, R, T, Y, ..., if you've connected to more than 10 IRC channels. If you have a Dvorak layout and use an emulator, should the mapping of your keyboard's keys to the emulated machine's keys be based on the positions of those keys (useful for games), or what's written on them (usually better for apps)? I would argue that the emulator should ignore the user's keyboard layout, and map keys based on their positions. Then, the layout can be set within the emulated machine, which can ignore the layout and work directly with scancodes, if necessary. Fortunately (or unfortunately, depending on how you look at it), the SAM is quite good at dealing with this problem. For other machines, such as the BBCs or Spectrums, I think you'd have to modify the ROM. (I've just tested SC_ASSEMBLER, and it works with the Dvorak layout. It would be interesting to know which other apps work.) > for example press shift-3 on the PC Keyboard to get the Pound > Sign and this translates to the Sam as symbol-L to get the pound sign. So, presumably the SAM initially sees the Shift key pressed. Then, when the user presses L, Shift would be released, and Symbol and L would be pressed. OTOH, that's better than the "fake-Shift" on PC keyboards. Cheers, -- Stuart Brady

