If you add rawkeydown handlers to your field, and then use the "type" command to type into them, you'll trap the key code being sent (which will always be the same for q no matter the keyboard) but there is then no relationship to the actual key on the keyboard that I can see.
As for your 2 field experiment, if you add pass rawkeydown in your second handler, does it solve the problem? Catching rawkeydown without passing it, should indeed keep anything from appearing in the field. On Sun, Feb 25, 2018 at 12:50 PM, Richmond Mathewson via use-livecode < email@example.com> wrote: > That looks like a good way to start (even though it is the wrong way > round). > > The next questions (now I'm on a roll, I'll keep rolling) are these: > > 1. How do I type a rawKey command? I probably cannot. > > 2. If I have a script that runs type "q" how do I trap therawKeyDown and > the rawKeyUp codes > so I can get them into a field? > > In terms of calibration all this will do is nothing as a stack that has > type "q" is a script will > do just that regardless of the end-user's keyboard layout. > > I just set my keyboard layout on my ancient iMac (10.7.5) to Bangla > (Bengali), which wouldn't know > a "q" to save its life. > > My test stack still typed a "q" into my field. > > I wonder what rawKeyDown and rawKeyUp the type command actually sent? > > I have a fantasy that goes a bit like this: > > Pseudocode > > select after field "ff" > send "rawKeyUp" > > but LiveCode "doesn't love me" that much. > > Richmond. > > On 25/2/2018 8:44 pm, Paul Dupuis via use-livecode wrote: > >> See the dictionary entry for the "type" command. This sends >> rawKeyUp|rawKeyDown messages >> >> This might let you construct a stack that "calibrates" (or whatever you >> want to call it) what keys on any keyboard generate what keyDown number >> and what characters >> >> >> On 2/25/2018 5:09 AM, Richmond Mathewson via use-livecode wrote: >> >>> Erm . . . >>> >>> I want to set up a stack that will list an end-user's keyDowns by >>> sending their system >>> a set of rawKeyUps . . . >>> >>> PseudoCode: >>> >>> in a button: >>> >>> on mouseUp >>> send "rawKeyDown" to key 113 >>> end mouseUp >>> >>> in the cardScript: >>> >>> on rawKeyDown XX >>> get keyUp XX >>> put XX somewhere useful >>> end rawKeyDown >>> >>> Richmond. >>> _______________________________________________ >>> use-livecode mailing list >>> firstname.lastname@example.org >>> Please visit this url to subscribe, unsubscribe and manage your >>> subscription preferences: >>> http://lists.runrev.com/mailman/listinfo/use-livecode >>> >>> >> _______________________________________________ >> use-livecode mailing list >> email@example.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 > firstname.lastname@example.org > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > _______________________________________________ use-livecode mailing list email@example.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode