Date : Tue, 20 May 2014 15:09:49 -0500
From : matt@... (Matt Godbolt)
Subject: JSBeeb
For what it's worth I've updated the jsbeeb key mappings and hopefully
they're a little better now. Let me know if the latest version works better
(or worse!) than before. I'm still trying to find out ways of reliably
detecting a keypress for the # key on a UK keyboard for Chrome: Firefox is
fine but Chrome tells me it's the "3" key (!)
Cheers, Matt :)
On Sunday, May 18, 2014, Matt Godbolt <matt@...> wrote:
> Sounds like I should put both in (and on further experimentation there
> are other keys to update too!). Will try and get it released later
> today with the fix - thanks guys :)
>
> On Sun, May 18, 2014@... AM, Mark Ashley <mark@...> wrote:
> > Hmm, trying the js console command it gives 'ad' now too. FF19 gave the 'bd'
> > earlier, FF29 gives 'ad' now. The JS console is changed in the new FF, I
> > wonder if that is relevant.
> >
> > Win XP SP3. FF29.
> >
> >
> > On Mon, May 19, 2014@... AM, Matt Godbolt <matt@...> wrote:
> >>
> >> I get "ad" in Firefox 28 (on Linux) - are you certain you see bd? I
> >> can easily add an additional mapping for ad too if it's just that!
> >>
> >> -matt
> >>
> >> On Sun, May 18, 2014@... AM, Matt Godbolt <matt@...> wrote:
> >> > I can confirm I get the same problem in FF! Investigating...thanks!
> >> >
> >> > On Sun, May 18, 2014@... AM, Mark Ashley <mark@...> wrote:
> >> >> FWIW I get the 'bd' keycode too, but the key output doesn't appear
> >> >> inside
> >> >> jsbeeb in my Firefox 19 or Firefox 29 browsers.
> >> >>
> >> >>
> >> >>
> >> >> On Mon, May 19, 2014@... AM, Matt Godbolt <matt@...>
> >> >> wrote:
> >> >>>
> >> >>> Hey all,
> >> >>>
> >> >>> Coming in late to this discuss via the flyby CC, so apologies if I'm
> >> >>> not quite answering the questions posed!
> >> >>>
> >> >>> Firstly, the keyboard handling in Javascript is a total mess! There's
> >> >>> no way to detect the keyboard layout of the computer and the codes
> >> >>> received are not quite physical keys but are something in-between.
> >> >>> For most keys it's a straight ASCII value, but then some keys have
> >> >>> random weird numbers (like the key 0xbd). As I'm on a US laptop
> >> >>> keyboard, the keys are tailored for that. I'm working on some
> >> >>> primitive locale-detection and then some different maps for UK and US
> >> >>> keyboards.
> >> >>>
> >> >>> To the original point anyway, the BBC -/= key ought to be the _/-
> >> >>> laptop key (directly next to the zero key). If that's not working for
> >> >>> you, it seems like I need even more complex mappings :) (it seems my
> >> >>> comment's wrong too, will fix that).
> >> >>>
> >> >>> As Mark says, it's pretty easy to debug these things. If you want to
> >> >>> run a local development version of jsbeeb, download and unpack it,
> >> >>> then run a local webserver. I use Python's built-in webserver, simply
> >> >>> typing "python -mSimpleHTTPServer" from the jsbeeb directory and then
> >> >>> visiting localhost:8000.
> >> >>>
> >> >>> Alternatively if you just want the keycodes, bring up a new web
> >> >>> browser, hit ctrl-shift J to get the javascript console up and type:
> >> >>>
> >> >>> window.onkeydown = function(e){
> >> >>> console.log(e.keyCode.toString(16)); };
> >> >>>
> >> >>> Then click back into the main window and start pressing keys. That'll
> >> >>> give you what I see. For reference I see "bd" for the underscore key
> >> >>> on my US keyboard.
> >> >>>
> >> >>> At the moment I'm working on adding Dropbox and Google Drive support
> >> >>> so you can save your disc images in the cloud, but I also have a
> >> >>> half-written "help" page about the keyboard mappings. Sounds like I
> >> >>> need to rethink that if other keyboards have different values (some
> >> >>> kind of reconfigurable setup?)
> >> >>>
> >> >>> Cheers, Matt :)
> >> >>>
> >> >>> - matt
> >> >>>
> >> >>> On Sun, May 18, 2014@... AM, Mark Ashley <mark@...>
wrote:
> --
> Matt
>
--
Matt