altkey() down, up & halfway down

Richmond richmondmathewson at gmail.com
Fri Nov 30 06:05:21 EST 2012


On 11/30/2012 09:04 AM, Richmond wrote:
> On 30/11/12 08:56, Richmond wrote:
>> On 30/11/12 08:33, Richmond wrote:
>>> Has anybody any bright ideas why this doesn't work:
>>>
>>> on mouseUp
>>>    if altkey() is down then
>>>       put "ALT key is down" into fld "fOUTPUT"
>>>    end if
>>> end mouseUp
>>>
>>> or this:
>>>
>>> on mouseUp
>>>    if the altkey is down then
>>>       put "ALT key is down" into fld "fOUTPUT"
>>>    end if
>>> end mouseUp
>>>
>>> on Linux?
>>>
>>> 'Tisn't funny, m'dears!
>>>
>>> Richmond.
>>
>> (blast, answering my own message again)
>>
>> The documentation appears to be a bit dicky; if I put this in a button:
>>
>> on mouseUp
>>    put empty into fld "fOUTPUT"
>>    put the keysDown into fld "fOUTPUT"
>> end mouseUP
>>
>> and I click the button with the SHIFT, CTRL, X, Y, Z or TAB keys 
>> pressed I get 'magic numbers';
>> all very well and super, BUT . . .
>>
>> there ain't nuffin doin' when I press the ALT key.
>>
>> Now that is NOT what the documentation says.
>>
>> Tested with LC 4.5 on Linux (Ubuntu 12.04) and Mac PPC (10.4); as at 
>> work (kids taking an exam)
>> I have not had a chance to test this on Windows.
>>
>> Richmond.
>>
>> And, 'tis a roight cough, cough, cough from my point of view as 
>> rather important
>> for the start of the next SDLC of Devawriter Pro.
>
> Am I on a roll this morning!
>
> If I put this into my cardScript:
>
> on rawKeyDown RK
>   put RK into fld "fOUTPUT"
> end rawKeyDown
>
> I DO get a magic number for the ALT key!!!!!!!!!!!!!!!!
>
> So, where the documentation is, ultimately misleading is this:
>
> "The keycodes returned by the keysDown function are the same as those 
> passed
> as parameters with the rawKeyDown and . . . "
>
> Richmond.

And, of course, that's no good at all on a Macintosh.




More information about the use-livecode mailing list