Problem with using ALT keys and/or CTRL keys with wxEuphoria

new topic     » topic index » view thread      » older message » newer message

/* Preliminary information – just for understanding Euphoria version 4.0.5 Wxeuphoria version 16 Demo program: catch_keys.exw Modified by me to create completely mirrored Hindi phonetic alphabet using English alphabet to create the real Hindi (Devnagari) characters in Unicode at hex E000 (private area). Devnagari alphabet is arranged as 4 similar character followed by its nasal character – groups of 5. Example: क ख ग घ have the English sounds k kh g gh respectively. Example: प फ ब भ have the English sounds p ph b bh respectively. Counting the Devnagari alphabet and its set of 9 vowel sounds and vowel attachments, I need about 50 characters. However, I also need half characters, as conjoint sounds in Devnagari us half characters. Example: in “sun” सन the full “s” character is there, but in “sweater” - the “sw” is represented as “ स्व ” - note the half “स” followed by the full “ व “ character I am using the lower case alphabet of English for “k and g” ( क ग )in the above example I am using the upper case (shifted) alphabet of English for “kh and gh” ( ख घ )in the above example The position is phonetically same as ASCII + E000 (decimal 57,344)

    integer HindiLoc=57344 -- Private area E000 

For the alphabet I have taken up locations 57,344 + 65 to 57,344 + 90 and 57,344 + 97 to 57,344 + 122 In the demo program, I add 57,344 to the keyIs

	keyIs = get_key_code( event )  
              keyIs = keyIs + Hindiloc 

IT WORKS FINE. However my half characters and vowel attachments are in the next 128 bytes, i.e. at HindiLoc + 128 Example: the character “s” (Ascii 115), which in Devnagari is “ स “ (my Devnagari 57,344 + 115) has its half “s” as in “ स्व ” at 57,344 + 128 + 115

MY PROBLEM: I can reach these extra two rows of 32 (or rather 26 ignoring the other characters) using the Tab key or F11 key

    integer HindiLoc=57344 -- Private area E000 
 
integer f11k = 0 – initialize the F11 flag  
integer tabk = 0 -- or the tab key flag 
--- later  
elsif keyIs = WXK_F11 then -- changing 
     f11k = 1 
elsif keyIs = WXK_TAB then – changing 
    tabk = 1 
--- later 
 if f11k = 1 then 
     keyIs1 = keyIs1 + 128  
end if 
 if tabk = 1 then 
     keyIs1 = keyIs1 + 128  
end if 
-- This code works very well.   

This code works very well. I can press the Tab key or the F11 key and release it and the flag takes care of taking me to the two 32 character lines 128 bytes away. So I have full key board control over the four 32 character lines (instead of the two available in ASCII (unshifted or shifted) I would like to use the ALT key and/or CTRL ley to take me to the 2 extra lines of 32 characters each. I tried

integer altk = 0 – initialize the Alt key flag or 
integer ctrlk = 0 – initialize the Ctrl key flag 
--- later 
elsif keyIs = WXK_ALT then -- changing 
     altk = 1 
elsif keyIs = WXK_CONTROL then – changing 
    ctrlk = 1 
--- later 
 if altk = 1 then 
     keyIs1 = keyIs1 + 128  
end if 
 if ctrlk = 1 then 
     keyIs1 = keyIs1 + 128  
end if 
 
-- This code DOES NOT WORK.   

IN A NUTSHELL: Normal ASCII characters are accessed by un-shifted or shifted alphabet keys.

Basically, I would like the control over four lines of 32 characters, using the Shift key as in ASCII and the Control key and the Alternate key.

I would also prefer to use these keys to set up flags and not have to keep the key pressed while entering the alphabet key.

I also tried the DOS keyIs = get_key() but that does not work.

In DOS The ALT key is 1032400 and the ctrl key is 1020096, but that too is not accepted once I am in the hands of wxEuphoria.

Please help

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu