[no subject]

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Return Value

The function returns one of the following values.

-1 	The specified virtual key is a dead-key character (accent or 
diacritic). This value is returned regardless of the keyboard layout, 
even if several characters have been typed and are stored in the 
keyboard state. If possible, even with Unicode keyboard layouts, the 
function has written a spacing version of the dead-key character to the 
buffer specified by /pwszBuff/. For example, the function writes the 
character SPACING ACUTE (0x00B4), rather than the character NON_SPACING 
ACUTE (0x0301).
0 	The specified virtual key has no translation for the current state of 
the keyboard. Nothing was written to the buffer specified by /pwszBuff/.
1 	One character was written to the buffer specified by /pwszBuff/.
2 or more 	Two or more characters were written to the buffer specified 
by /pwszBuff/. The most common cause for this is that a dead-key 
character (accent or diacritic) stored in the keyboard layout could not 
be combined with the specified virtual key to form a single character. 
However, the buffer may contain more characters than the return value 
specifies. When this happens, any extra characters are invalid and 
should be ignored.



I guess the way to handle it is to push all the characters from `chars' 
into the readkey()-buffer if the return value of ToUnicode() is > 0.  It 
would require changes to the common keyboard code though.

Peter




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/