Topic 'ˇ' dk(1) + any(...) > ... not working when 'ˇ' typed using AltGr

We have two new locations for Keyman technical support:

The Tavultesoft Forums are now read only.


# 'ˇ' dk(1) + any(...) > ... not working when 'ˇ' typed using AltGr   2017-03-06 00:47:33.197
Jukka K. Korpela
I’ve tried to implement functionality where the caron “ˇ” is made a to combine with the next letter (e.g.) in certain cases to produce a letter with caron (e.g. š), much like the EuroLatin keyboard has

store(controls) "'`^:~@$\-,*%." '"'
store(caronO) 'čČďĎěĚľĽňŇřŘšŠťŤžŽ'
store(caronK) 'cCdDeElLnNrRsStTzZ'
'%' dk(1) + any(caronK) > index(caronO, 3)

The problem is that instead of a normal character like “%”, I need to use “˘” created using AltGr (right Alt), specifically

+ [RALT "'"] > 'ˇ'

And for some reason, this doesn’t work: typing ˇs produces just those two characters, not š.

I have included “ˇ” in controls, and I have also tried setting directly

+ 'ˇ' > 'ˇ' dk(1)

I wonder if this is a limitation, a bug, or my failure to use the language properly.

I can circumvent the problem by not using dk(...) at all in this context, setting simply

'ˇ' + 's' > 'š'

but this requires a large number of rules.

It would be desirable to be able to use the more compact (and less error-prone) notations that can handle a large set of combinations with letters in a few statements.

I’m using Keyman Developer 9.0.
# RE: 'ˇ' dk(1) + any(...) > ... not working when 'ˇ' typed using AltGr   2017-03-07 13:49:29.887
Marc Durdin
Tavultesoft Staff
As far as I can tell (because I can't see quite enough of the keyboard source to be sure), the problem is this rule:

+ [RALT "'"] > 'ˇ'

should be:

+ [RALT "'"] > 'ˇ' dk(1)

This will then allow

'ˇ' dk(1) + any(caronK) > index(caronO, 3)

to match correctly.

Either that, or drop use of the dk(1) in both rules?
# RE: 'ˇ' dk(1) + any(...) > ... not working when 'ˇ' typed using AltGr   2017-03-07 17:22:00.680
Jukka K. Korpela
Sorry, I did not mention that I had
+ any(controls) > index(controls, 1) dk(1)
and I had also tried instead setting directly
+ 'ˇ' > 'ˇ' dk(1)
but that didn’t help.

But omitting dk(1)’s helped. I had actually tried that, too, without realizing that in
%' dk(1) + any(caronK) > index(caronO, 3)
I need to change 3 to 2 when omitting dk(1).

(I had somehow thought that dk(1)’s are needed here, because EuroLatin uses them.)

There’s still one oddity: the approach does not work for the ogonek produced with Shift AltGR ´:

+ [SHIFT RALT '´'] > '˛'
store(ogonekO) 'ąĄęĘįĮǫǪųŲ˛'
store(ogonekK) 'aAeEiIoOuU '
'˛' + any(ogonekO) > index(ogonekK, 2)

But I’ll just use the store()-less method here.
# RE: 'ˇ' dk(1) + any(...) > ... not working when 'ˇ' typed using AltGr   2017-03-08 11:38:04.920
Marc Durdin
Tavultesoft Staff
I think you reversed the stores:

'˛' + any(ogonekO) > index(ogonekK, 2)

should be:

'˛' + any(ogonekK) > index(ogonekO, 2)