Topic Multi key sequence having different combination

We have two new locations for Keyman technical support:

The Tavultesoft Forums are now read only.


# Multi key sequence having different combination   2015-11-25 01:22:18.733
Sougata Das
How can the following be achieved:

c > U+004C
c + h > U+004C
c + h + h > U+0052

q > U+004C
q + h > U+004D

k > U+004C
k + h > U+004D

If I use context (U+004C) the first combination rule gets fired and later two combinations does not work.

Is there a way to work with previous keystrokes rather than context. For example a dynamic variable array that stores few last keystrokes etc and conditional processing of the same.

Please help. I am a newbie and learning Keyman Developer while trying to achieve something. The keyboard I am designing is phonetic and creates different letters and conjuncts using different key combinations. I am also worried in inserting the akaar/eekar/matras before or after letters/conjuncts.

Please Help.
# RE: Multi key sequence having different combination   2015-11-25 06:39:09.050
Marc Durdin
Tavultesoft Staff
I'm not entirely clear on how your input is working. Do you mean:

(a) if you type 'c', you get 4C; if you type 'cc' you get 4C 4C; and if you type 'cch' you get 4C 4C 52, or

(b) if you type 'c', you get 4C; if you type 'cc' you also get 4C; but if you type 'cch' you get 52?

Both of these can be solved with the context model but I'd like to give the right answer :)
# RE: Multi key sequence having different combination   2015-11-25 15:32:15.507
Sougata Das
Good Morning Marc,

My bad Typo. c+h > U+0051
so the following would be correct: Left hand side are key combinations, right hand side desired output
The code tag is used for dexterity
:

c          > U+004C  c L (ক) c
c + h     > U+0051  c Q(চ) c+h
c + h + h > U+0052  c R (ছ) c+h+h

q         > U+004C  c L (ক) c
q + h     > U+004D  c M(খ) k+h   

k         > U+004C  c L (ক) c 
k + h     > U+004D  c M(খ) k+h


This is what I was doing:
:


+ 'c'         > U+004C c L (ক) c
U+004C + 'h'   > U+0051 c Q (চ) c+h
U+0051 + 'h'   > U+0052 c R (ছ) c+h+h

 + 'k'         > U+004C c L (ক) k
U+004C + 'h'   > U+004D c M (খ) k+h


The comment section has the remapped character, followed by bengali character it renders, followed by the keystrokes that it produced.
Naturally the last line is never getting fired. I need to understand "context" better. I have learnt from your help the context is whatever at the cursor, how it is related to previous keystroke.

Best Regards
Sougata
# RE: Multi key sequence having different combination   2015-11-25 16:16:55.103
Marc Durdin
Tavultesoft Staff
What you have is nearly there. In order to distinguish between the 'c' and 'k' keys, you'll need to use a deadkey (http://help.keyman.com/developer/language/reference/deadkey) placeholder (dk is an alias for deadkey):

:
+ 'c'                     > deadkey(c) U+004C c L (ক) c
deadkey(c) U+004C + 'h'   > U+0051            c Q (চ) c+h
U+0051 + 'h'              > U+0052            c R (ছ) c+h+h

+ 'k'                     > deadkey(k) U+004C c L (ক) k
deadkey(k) U+004C + 'h'   > U+004D            c M (খ) k+h


Putting the deadkey first allows you to ignore if it you aren't interested in it.
# RE: Multi key sequence having different combination   2015-11-25 16:20:22.457
Sougata Das
Didn't know deadkey could be used like that. Awesome. Thanks.