Re: altkey() down, up halfway down

2012-12-02 Thread Richmond

Advice from Andre Garzia:

I have no problem with that and I use it here as well. Just do a visual 
feedback like this:
on rawKeydown, check for the altKey and change all the labels of the 
buttons for the
actions they will perform if that key is down, this way, as soon as 
someone presses ALT,

the labels change and they know what is happening.

which makes 100% sense, but I really don't know HOW on a Macintosh:

On a Macintosh on rawKeydown, check for the altKey means 'check that 
the altKey is down as I press another key', so
any label changing on buttons is going to happen AFTER THE FACT rather 
than BEFORE, which misses the point.


as soon as someone presses ALT, the labels change

would be lovely, and can be lovely on Windows or Linux, but cannot on 
Macintosh as

far as I can see.

Richmond.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: altkey() down, up halfway down

2012-12-02 Thread Scott Rossi
If you are using alt as a modifier:

on rawKeyDown
  if altKey() = down then
 -- do some stuff
  end if
end rawKeyDown

If you just want to detect the alt key, one option could be to use the
idle message which essentially acts as a loop:

[ card or stack script ]
on idle

  if altKey() = down then -- do some stuff
  end if
  pass idle
end idle




Regards,

Scott Rossi
Creative Director
Tactile Media, UX Design




On 12/2/12 12:00 AM, Richmond richmondmathew...@gmail.com wrote:

Advice from Andre Garzia:

I have no problem with that and I use it here as well. Just do a visual
feedback like this:
on rawKeydown, check for the altKey and change all the labels of the
buttons for the
actions they will perform if that key is down, this way, as soon as
someone presses ALT,
the labels change and they know what is happening.

which makes 100% sense, but I really don't know HOW on a Macintosh:

On a Macintosh on rawKeydown, check for the altKey means 'check that
the altKey is down as I press another key', so
any label changing on buttons is going to happen AFTER THE FACT rather
than BEFORE, which misses the point.

as soon as someone presses ALT, the labels change

would be lovely, and can be lovely on Windows or Linux, but cannot on
Macintosh as
far as I can see.

Richmond.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: altkey() down, up halfway down

2012-12-02 Thread Richmond

If I have this sort of script in my stack:

on rawKeydown
   if altKey() = down then
 put ALT down into fld AKD
   end if
end rawKeydown

on Macintosh that ONLY WORKS if I am pressing an alphanumeric key while 
holding the altKey down,


it DOES NOT work if all I do is press the altKey.

Now, Andre Garzia's advice went like this:

on rawKeydown, check for the altKey and change all the labels of the 
buttons for the actions they will
perform if that key is down, this way, as soon as someone presses ALT, 
the labels change and they know

what is happening.

and this is NOT possible on Macintosh, while it is on Linux and Windows.

Richmond.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: altkey() down, up halfway down

2012-12-02 Thread Mike Bonner
Late to this discussion but.. Polling (or maybe an external?) is the only
real solution for this problem right?


On Sun, Dec 2, 2012 at 7:59 AM, Richmond richmondmathew...@gmail.comwrote:

 If I have this sort of script in my stack:

 on rawKeydown
if altKey() = down then
  put ALT down into fld AKD
end if
 end rawKeydown

 on Macintosh that ONLY WORKS if I am pressing an alphanumeric key while
 holding the altKey down,

 it DOES NOT work if all I do is press the altKey.

 Now, Andre Garzia's advice went like this:

 on rawKeydown, check for the altKey and change all the labels of the
 buttons for the actions they will
 perform if that key is down, this way, as soon as someone presses ALT, the
 labels change and they know
 what is happening.

 and this is NOT possible on Macintosh, while it is on Linux and Windows.

 Richmond.

 __**_
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/**mailman/listinfo/use-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: altkey() down, up halfway down

2012-12-02 Thread Richmond

On 12/02/2012 05:30 PM, Mike Bonner wrote:

Late to this discussion but.. Polling (or maybe an external?) is the only
real solution for this problem right?





Polling the key downs is possible, but will slow down
a program considerably.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: altkey() down, up halfway down

2012-12-02 Thread Mike Bonner
Use idle as scott said? Or, if you don't need it to be super responsive. IE
you're using visual cues as andre suggested, then polling every 100 or 150
milliseconds might suffice. Idle is probably easiest. Was wondering about
the external, seems that since this is related to os/arch even an external
would just have to sit there polling also. (though it could do it in it's
own little area and only speak up when a key changes state)  So an external
would probably be the best option except for that whole having to write
it thing.



On Sun, Dec 2, 2012 at 8:42 AM, Richmond richmondmathew...@gmail.comwrote:

 On 12/02/2012 05:30 PM, Mike Bonner wrote:

 Late to this discussion but.. Polling (or maybe an external?) is the only
 real solution for this problem right?




 Polling the key downs is possible, but will slow down
 a program considerably.

 __**_
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/**mailman/listinfo/use-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: altkey() down, up halfway down

2012-12-02 Thread Richmond

On 12/02/2012 05:58 PM, Mike Bonner wrote:

Use idle as scott said? Or, if you don't need it to be super responsive.


My Devawriter does have to be 'super responsive' as it is, ultimately, a 
glorified typewriter,
and as such should, in an ideal situation, work not much more slowly 
than the speed one might enter
text into a text editor. For the sake of argument, even though I type 
with only 2 fingers and have to
keep looking at the keyboard, I still manage to knock out about 50 words 
a minute!


Obviously there isn't all that much 'idle' when someone is bashing away 
on the keyboard.



IE
you're using visual cues as andre suggested, then polling every 100 or 150
milliseconds might suffice. Idle is probably easiest. Was wondering about
the external, seems that since this is related to os/arch even an external
would just have to sit there polling also. (though it could do it in it's
own little area and only speak up when a key changes state)  So an external
would probably be the best option except for that whole having to write
it thing.





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: altkey() down, up halfway down

2012-12-02 Thread Mike Bonner
Yeah, too true.  And if others are like me, having to wait for things to
catch up is really annoying!

Well, this is only osx (objective c) and I'm clueless about it, but the
example on this page might give someone who isn't a clueless c nub like me
a chance to build an external to catch key presses.
http://stackoverflow.com/questions/12113795/is-there-a-keyup-method-for-flagschanged



On Sun, Dec 2, 2012 at 9:39 AM, Richmond richmondmathew...@gmail.comwrote:

 On 12/02/2012 05:58 PM, Mike Bonner wrote:

 Use idle as scott said? Or, if you don't need it to be super responsive.


 My Devawriter does have to be 'super responsive' as it is, ultimately, a
 glorified typewriter,
 and as such should, in an ideal situation, work not much more slowly than
 the speed one might enter
 text into a text editor. For the sake of argument, even though I type with
 only 2 fingers and have to
 keep looking at the keyboard, I still manage to knock out about 50 words a
 minute!

 Obviously there isn't all that much 'idle' when someone is bashing away on
 the keyboard.


  IE
 you're using visual cues as andre suggested, then polling every 100 or 150
 milliseconds might suffice. Idle is probably easiest. Was wondering about
 the external, seems that since this is related to os/arch even an external
 would just have to sit there polling also. (though it could do it in it's
 own little area and only speak up when a key changes state)  So an
 external
 would probably be the best option except for that whole having to write
 it thing.




 __**_
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/**mailman/listinfo/use-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: altkey() down, up halfway down

2012-12-02 Thread Richmond

On 12/02/2012 07:02 PM, Mike Bonner wrote:

Yeah, too true.  And if others are like me, having to wait for things to
catch up is really annoying!

Well, this is only osx (objective c) and I'm clueless about it, but the
example on this page might give someone who isn't a clueless c nub like me
a chance to build an external to catch key presses.
http://stackoverflow.com/questions/12113795/is-there-a-keyup-method-for-flagschanged



Ha, Ha; there is only one problem here; I haven't looked at any 
programming language (except for a brief 'perversion' with Toolbook)
other than xTalk (or whatever Runtime Revolution call the Livecode 
langaue at the moment) since I left BBC BASIC in 1990.


So that code looks:

1. odd

and

2. I wouldn't have a clue how to integrate those few lines into anything 
else, let alone get it to interact with a Livecode standalone.


AND . . . and here's the rub . . .

I really want to have one code-base for my product, rather than fork the 
thing into 2 or 3 branches (Mac, Lin and Win),
as subsequent modifications would involve a considerably large amount of 
(repetitive) work than keeping it as a single

code base.

It is, of course, quite possible to have the stack to detect the 
operating system and act accordingly . . .




On Sun, Dec 2, 2012 at 9:39 AM, Richmond richmondmathew...@gmail.comwrote:


On 12/02/2012 05:58 PM, Mike Bonner wrote:


Use idle as scott said? Or, if you don't need it to be super responsive.


My Devawriter does have to be 'super responsive' as it is, ultimately, a
glorified typewriter,
and as such should, in an ideal situation, work not much more slowly than
the speed one might enter
text into a text editor. For the sake of argument, even though I type with
only 2 fingers and have to
keep looking at the keyboard, I still manage to knock out about 50 words a
minute!

Obviously there isn't all that much 'idle' when someone is bashing away on
the keyboard.


  IE

you're using visual cues as andre suggested, then polling every 100 or 150
milliseconds might suffice. Idle is probably easiest. Was wondering about
the external, seems that since this is related to os/arch even an external
would just have to sit there polling also. (though it could do it in it's
own little area and only speak up when a key changes state)  So an
external
would probably be the best option except for that whole having to write
it thing.




__**_
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/**mailman/listinfo/use-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: altkey() down, up halfway down

2012-12-02 Thread Richmond

On Macintosh, according to Apple's documentation the key code for
the left option key is 98 and 58 for the right option key.

There is a school of thought flying around that the key code for both is 35.

However . . . keysDown doesn't work for modifier keys on Mac . . .

interestingly enough this:

set the useUnicode to true
set the unicodeText of fld KEEZE to numToChar(58)

isn't much help.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: altkey() down, up halfway down

2012-12-02 Thread Paul Hibbert
I remembered something about updateScreen on the Game Academy, they used 
dispatch to poll the stack for a screen refresh and it didn't seem to have too 
much detrimental effect on the game, I had a quick look, took out the bones and 
tried this…

on preOpenStack
   if the platform is MacOS then dispatchUpdateKey
end preOpenStack

on altKeyCheck
if altKey() = down then
  set the label of btn clearButton to Reset
   else
  set the label of btn clearButton to Clear
end if
end altKeyCheck

on dispatchUpdateKey
   dispatch altKeyCheck to me
   send dispatchUpdateKey to me in 250 milliseconds ## Change the value to 
suit
end dispatchUpdateKey

It seems to work OK for my test, this would poll about 4 times a second so that 
shouldn't carry too much overhead, but is easily adjustable to suit your needs 
and you could easily add in a ctrlKey, cmdKey and shiftKey check too if 
necessary.

Just a thought.

Paul
 
On 2012-12-02, at 9:23 AM, Richmond wrote:

 On 12/02/2012 07:02 PM, Mike Bonner wrote:
 Yeah, too true.  And if others are like me, having to wait for things to
 catch up is really annoying!
 
 Well, this is only osx (objective c) and I'm clueless about it, but the
 example on this page might give someone who isn't a clueless c nub like me
 a chance to build an external to catch key presses.
 http://stackoverflow.com/questions/12113795/is-there-a-keyup-method-for-flagschanged
 
 
 Ha, Ha; there is only one problem here; I haven't looked at any programming 
 language (except for a brief 'perversion' with Toolbook)
 other than xTalk (or whatever Runtime Revolution call the Livecode langaue at 
 the moment) since I left BBC BASIC in 1990.
 
 So that code looks:
 
 1. odd
 
 and
 
 2. I wouldn't have a clue how to integrate those few lines into anything 
 else, let alone get it to interact with a Livecode standalone.
 
 AND . . . and here's the rub . . .
 
 I really want to have one code-base for my product, rather than fork the 
 thing into 2 or 3 branches (Mac, Lin and Win),
 as subsequent modifications would involve a considerably large amount of 
 (repetitive) work than keeping it as a single
 code base.
 
 It is, of course, quite possible to have the stack to detect the operating 
 system and act accordingly . . .
 
 
 On Sun, Dec 2, 2012 at 9:39 AM, Richmond richmondmathew...@gmail.comwrote:
 
 On 12/02/2012 05:58 PM, Mike Bonner wrote:
 
 Use idle as scott said? Or, if you don't need it to be super responsive.
 
 My Devawriter does have to be 'super responsive' as it is, ultimately, a
 glorified typewriter,
 and as such should, in an ideal situation, work not much more slowly than
 the speed one might enter
 text into a text editor. For the sake of argument, even though I type with
 only 2 fingers and have to
 keep looking at the keyboard, I still manage to knock out about 50 words a
 minute!
 
 Obviously there isn't all that much 'idle' when someone is bashing away on
 the keyboard.
 
 
  IE
 you're using visual cues as andre suggested, then polling every 100 or 150
 milliseconds might suffice. Idle is probably easiest. Was wondering about
 the external, seems that since this is related to os/arch even an external
 would just have to sit there polling also. (though it could do it in it's
 own little area and only speak up when a key changes state)  So an
 external
 would probably be the best option except for that whole having to write
 it thing.
 
 
 
 __**_
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/**mailman/listinfo/use-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your subscription 
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode
 
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your subscription 
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: altkey() down, up halfway down

2012-11-30 Thread Richmond

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.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: altkey() down, up halfway down

2012-11-30 Thread Richmond

Is it just me, or . . . ?

So, here I am, during my luch break, at home, AND . . .

having had No joy with this on my G3 iMac running Mac OS 10.4 at the 
school:


on mouseUp
   if the altKey is down then
 put down into fld fOUTPUT
   end if
end mouseUp

it works on MacINTEL 10.6.7 !

but NOT on Xubuntu 12.10.

Do INTEL Macs send rawKey messages from modifier keys, while
PPC Macs do not?

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: altkey() down, up halfway down

2012-11-30 Thread J. Landman Gay

On 11/30/12 5:20 AM, Richmond wrote:

Is it just me, or . . . ?

So, here I am, during my luch break, at home, AND . . .

having had No joy with this on my G3 iMac running Mac OS 10.4 at the
school:

on mouseUp
if the altKey is down then
  put down into fld fOUTPUT
end if
end mouseUp

it works on MacINTEL 10.6.7 !

but NOT on Xubuntu 12.10.

Do INTEL Macs send rawKey messages from modifier keys, while
PPC Macs do not?


I think every OS is different. Try a handler using on optionKeyDown. 
Note that no message is sent with the key alone, it is only sent when 
the user types a key combo, but for your shortcuts that's what you want 
anyway.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: altkey() down, up halfway down

2012-11-30 Thread Richmond

On 30/11/12 19:47, J. Landman Gay wrote:

On 11/30/12 5:20 AM, Richmond wrote:

Is it just me, or . . . ?

So, here I am, during my luch break, at home, AND . . .

having had No joy with this on my G3 iMac running Mac OS 10.4 at the
school:

on mouseUp
if the altKey is down then
  put down into fld fOUTPUT
end if
end mouseUp

it works on MacINTEL 10.6.7 !

but NOT on Xubuntu 12.10.

Do INTEL Macs send rawKey messages from modifier keys, while
PPC Macs do not?


I think every OS is different. Try a handler using on optionKeyDown. 
Note that no message is sent with the key alone, it is only sent when 
the user types a key combo, but for your shortcuts that's what you 
want anyway.




Thanks, Jacque . . . as usual I have solved the problem having already 
made myself look

a complete fool all over the use-list . . . LOL

Nothwithstanding the above, I do wonder why Livecode-on-Mac cannot grab 
onto rawKeyDowns

for modifier keys.

Richmond.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: altkey() down, up halfway down

2012-11-30 Thread J. Landman Gay

On 11/30/12 11:52 AM, Richmond wrote:


Nothwithstanding the above, I do wonder why Livecode-on-Mac cannot grab
onto rawKeyDownsfor modifier keys.


As I understand it, the OS doesn't send any key messages until the combo 
is typed. I believe it's always been that way on Macs; at least, I 
recall dealing with it back in OS 9 and HyperCard.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: altkey() down, up halfway down

2012-11-30 Thread Richmond

On 11/30/2012 10:38 PM, J. Landman Gay wrote:

On 11/30/12 11:52 AM, Richmond wrote:


Nothwithstanding the above, I do wonder why Livecode-on-Mac cannot grab
onto rawKeyDownsfor modifier keys.


As I understand it, the OS doesn't send any key messages until the 
combo is typed. I believe it's always been that way on Macs; at least, 
I recall dealing with it back in OS 9 and HyperCard.




Thank you Jacque and Robert.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


altkey() down, up halfway down

2012-11-29 Thread Richmond

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.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: altkey() down, up halfway down

2012-11-29 Thread Richmond

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.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: altkey() down, up halfway down

2012-11-29 Thread Richmond

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.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode