SHIFTkey horrors

Richmond richmondmathewson at gmail.com
Wed May 9 08:43:48 EDT 2012


What follows is an extract from a message I have just sent to a 
colleague; it concerns
a really large problem:

-----------------------------------------------------------------------------------------------------------------

"Then when the shift key is held down, all the vowels appear, type your 
vowel,
then when you let go, the consonant panel appears again
This behavior will be *very* familiar to everyone..."

That would be perfectly alright (and it appeals to me) if it were not 
for a limitation in Livecode and/or Macintosh; that when one presses
the SHIFT key on a Mac keyboard a Livecode stack does not receive a 
rawKeyDown signal: this has also been discussed between us
several times.

For instance; one could have a very simple bit of code rather like this:

if shiftkey() is down then
   --do something--
else
   --do something else--
end if

and it would work without a hitch.

What one CANNOT do is something like this:

on rawKeyDown KEE
   if KEE= XXXX  then --where 'XXXX' is a number--
     ---do something----
   else
     ---do something else---
   end if
end rawKeyDown

as pressing the SHIFTkey on a Mac keyboard does not generate a 
rawKeyDown number
rather like the DELETEkey generates 65288

this has been a "right bu**er" all along.

SO; it is perfectly possible to have a KEY on the keyboard generate a 
consonant when the SHIFTkey is NOT down,
and a vowel when the SHIFTkey is down; but one cannot change the display 
that the typist sees in front of him on the screen.

[come to think of things, I'm going to post this bit 'up' on the 
Use-List on the off-chance that some wise soul has
found a work-around for this old chestnut]

Please don't think I'm so daft I haven't thought about this "one" long 
and hard . . .  :)

-----------------------------------------------------------------------------

does anybody have any suggestions as to how one might circumvent this 
problem?

sincerely, Richmond.




More information about the use-livecode mailing list