xroar keyboard mapping for windows 7

A place to discuss everything Dragon related that doesn't fall into the other categories.
pser1
Posts: 1665
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: xroar keyboard mapping for windows 7

Post by pser1 »

Hi Ciaran,
I have added the parameter:
-keymap de
and later -keymap sp and -keymap uk
And all of them do lose the 5 keystroke ...

regards
pere
sixxie
Posts: 1348
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: xroar keyboard mapping for windows 7

Post by sixxie »

Ah I meant the keyboard layout configured in Windows.

The "-keymap" option only affects the untranslated layout - tries to make the physical key layout as close to a real Dragon as possible. Translated mode queries the OS, so the configured layout there is important.
pser1
Posts: 1665
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: xroar keyboard mapping for windows 7

Post by pser1 »

Hi,
ok, I got it the wrong way :-(
Verified Windows7 keyboard ... it has always been "Spanish (Spain, international)", I never changed it!)
And this affects ONLY the very last snapshot, all of the previous ones produce the '5' without exception.
cheers
pere
sixxie
Posts: 1348
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: xroar keyboard mapping for windows 7

Post by sixxie »

Ok, confirmed. In the Spanish layout, ToUnicode() returns two characters for unshifted '5' key: first one is '~', second one is '5'. This makes perfect sense.

Though I'm a bit slow today, so if anyone can explain it to me, much obliged.

Now have to reason about whether using the *last* character returned makes any sense...
pser1
Posts: 1665
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: xroar keyboard mapping for windows 7

Post by pser1 »

sixxie wrote:Ok, confirmed. In the Spanish layout, ToUnicode() returns two characters for unshifted '5' key: first one is '~', second one is '5'. This makes perfect sense.
Though I'm a bit slow today, so if anyone can explain it to me, much obliged.
Now have to reason about whether using the *last* character returned makes any sense...
I have 'changed' the keyboard on the Windows7 task bar so that it reads English (USA) and the
result is the same, no way to get the '5' keystroke
Seems really strange this behaviour. And why doesn't it happen with any previous snapshot?
Are there that many modifications done on the last one?
cheers
pere

Ps If I could do any kind of test (on a windows7 machine, of course), count on me!
pser1
Posts: 1665
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: xroar keyboard mapping for windows 7

Post by pser1 »

Hi Ciaran,
with previous snapshot I can see the codes for keystrokes, both press and release,
but I don't know how to do the same with the very last snapshot :-(

cheers
pere
previous version.jpg
previous version.jpg (75.28 KiB) Viewed 4046 times
sixxie
Posts: 1348
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: xroar keyboard mapping for windows 7

Post by sixxie »

So, another day another snapshot.

This one uses the last returned character from ToUnicode() to map keys, and seems to work with the Spanish layout. Hopefully it doesn't break other layouts - not well tested.

Also adds the "-C" (that's capital 'C' - lowercase "-c filename" already specifies an alternate config file), which allocates a console.
pser1
Posts: 1665
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: xroar keyboard mapping for windows 7

Post by pser1 »

sixxie wrote:So, another day another snapshot.
This one uses the last returned character from ToUnicode() to map keys, and seems to work with the Spanish layout. Hopefully it doesn't break other layouts - not well tested.
Also adds the "-C" (that's capital 'C' - lowercase "-c filename" already specifies an alternate config file), which allocates a console.
Hi Ciaran, thanks a lot!
This one accepts all of the numbers, 5 included!
I am sure you don't like making changes that way, but I cannot spot why ToUnicode() has 'always' returned only one char and now it sends two for the '5' key.
There must be a reason, something changed in the very last snapshot has to be causing it, the problem is how to detect what is :-(
cheers
pere
sixxie
Posts: 1348
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: xroar keyboard mapping for windows 7

Post by sixxie »

pser1 wrote:I am sure you don't like making changes that way, but I cannot spot why ToUnicode() has 'always' returned only one char and now it sends two for the '5' key.
There must be a reason, something changed in the very last snapshot has to be causing it, the problem is how to detect what is :-(
AFAICT, the only actual logical change for the unshifted characters is that in the newer version I give it space for up to four replies, where before there was only space for two. Which explains very little, as only two are returned anyway!

Agreed, it's a little baffling. I should test and see what happens if I only give it space for one...

Edit: the only *other* change is the modifiers that are "pressed" to determine the key*before* the unshifted one. It would be quite crazy if that affected it!

Further edit: waiiiit a minute... AltGr+4 is a dead_tilde... It *is* that! It must keep state. Now, I wonder if there's a proper way to flush cached dead "keypresses"...
sixxie
Posts: 1348
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: xroar keyboard mapping for windows 7

Post by sixxie »

Ok, one more snapshot (2017-41301). This one asks for a translation of virtual key 0 after every request to hopefully clear the dead key state before the next one. It also only asks for one translation.

Hopefully this works - don't worry if you can't test straight away, I'll be able to tomorrow.
Post Reply