Skip to content

add keycodes for AZERTY keyboard and German umlauts, fix #1#4

Merged
billgathen merged 1 commit intobillgathen:masterfrom
jancborchardt:add-keycodes
Nov 24, 2015
Merged

add keycodes for AZERTY keyboard and German umlauts, fix #1#4
billgathen merged 1 commit intobillgathen:masterfrom
jancborchardt:add-keycodes

Conversation

@jancborchardt
Copy link
Contributor

Fix #1, please review @PoroCYon @billgathen

The ö wasn’t really possible to catch so it’s a small hack. Just check at this Keycode test page, the results are like this for a normal letter:
l
And this for ö
ö
Basically this means that ä and ü are also caught by this, which I don’t really consider a problem.

@PoroCYon
Copy link

👍

billgathen added a commit that referenced this pull request Nov 24, 2015
add keycodes for AZERTY keyboard and German umlauts, fix #1
@billgathen billgathen merged commit 9f1d5fd into billgathen:master Nov 24, 2015
@billgathen
Copy link
Owner

Thanks, @jancborchardt! Merged and a new version pushed to http://billgathen.github.io/pentaphone/dist/index.html cc/ @PoroCYon

@jancborchardt
Copy link
Contributor Author

@billgathen while in the HTML it’s reflected, the JS doesn’t seem to work correctly yet. Next to the eventTypeForCode array there is another keyCodeFor which only has one key for each note. It’s strange cause on my local installation it worked.

@jancborchardt jancborchardt deleted the add-keycodes branch November 24, 2015 21:14
@billgathen
Copy link
Owner

I thought it was odd that the number for the umlaut was zero. Do the other new keys work correctly?

@PoroCYon
Copy link

Doesn't seem to be working for me either...

@jancborchardt
Copy link
Contributor Author

@billgathen I’m pretty sure this is due to the JS not being correctly compiled, as I said there are 2 different arrays with one having outdated info.

@billgathen
Copy link
Owner

I went around in circles for awhile trying to figure out why that wasn't being bundled properly, but I finally realized those two areas are unrelated.

keyCodeFor is actually part of launchpad_communicator_element.react.js, which takes the string emitted by key_store.js ('Organ', 'IV', etc.) and sends it to the Launchpad. It's not part of the sound generation code chain. It doesn't even get executed when there isn't a device connected.

The x key listener I just added to show the song samples is working, which is part of the eventTypeForCode object, so I think it is something about the numbers themselves. The bundling is working.

I did manage to figure out how to get alternate keyboards running on my Mac, so I've done some experimenting.

@PoroCYon I got 77 for the AZERTY (FN) keyboard (in Chrome and Firefox), so I changed the 109 mapping to that, but it still isn't working.

@jancborchardt Oddly, with the German layout I got the same 186 code for the umlaut that I got for the ; in the US layout, but only in Chrome. In Firefox I got a zero back, just like you did. Can you confirm whether it works in Chrome for you?

@jancborchardt
Copy link
Contributor Author

@billgathen actually it works in Firefox, but not in Chrome … wow. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants