Keys pressed

Richard Gaskin ambassador at fourthworld.com
Wed Dec 22 22:00:31 EST 2004


Alex Tweedly wrote:
> Richard Gaskin wrote:
> 
>> Paul Salyers wrote:
>>
>>> I need to know how to do a keypressed function:
>>>
>>> EX:
>>>
>>> press the "I" and it will goto the Information card
>>>
>>>     Case Asc("I"), Asc("i")
>>>          Open instruction card
>>>     End case
>>>
>>> This is an VB example and I have the painful job of converting 
>>> without much help in doc
>>
>> There must be something in those 3,000 pages for ya' -- let's see what 
>> we can find:
>>
>> ...launching Rev, clicking Documentation....
>> ...flipped the option control to "Search for:", enter "key pressed"...
>>
>> - blamo!:  found the keyDown and keyUp messages.
>>
>> Check those out and you should have what you need.
>
> I'm sure it's in there - and I'm even sure Paul tried to look .....

I didn't mean to imply he hadn't.  But while I don't know what path he 
had tried, I do know what I would try if I were there in his office 
working for him, which is what I wrote.

Fortunately, the phrasing he used turns up great results.  But as you 
found, varations can be less useful:

> don't assume it's as easy as it might seem with the benefit of 
> knowledge/hindsight/intuition that makes you pick the right phrase.
> 
> Here's what I did ....
> 
> ... launching Rev,. click Documentation...
> ... flip option to Search ...., enter "keypress"
> 
> wait for approx 2 minutes while it spins that stupid little cursor ....
> get about 10 entries .... none of which is keyDown or keyUp

2 minutes?  What speed?

Searching through thousands of tiny text files will never be as fast as 
working with the native object model as was done in earlier versions, 
and if it takes two minutes I'd agree it passes a threshold of usefulness.

> (though the 7th entry would (if I hadn't given up by then) have referred 
> me to keyDown in the "See also ..." list.)

You're right:  I had searched only for the term Paul used, "key pressed".

Trying another avenue, switching to the "Topics" mode I see many things 
but none called something like "Working with text".  Searching for 
"keyboard event" also yields zero entries. So does searching for "key 
event".

Ironically, the best search turns out to be the exact one the poster was 
looking for, but variations on that are fruitless.

Rather than risk another long thread about the docs, I'll follow my own 
advice and explore recommendations for improving searching to the 
RevDocs group at <http://groups.yahoo.com/group/RevDocs/>.

But I do agree that there's much room for improvement.  Hopefully the 
recommendations from the RevDocs group will help.

Good catch.  Thanks.

--
  Richard Gaskin
  Fourth World Media Corporation
  __________________________________________________
  Rev tools and more: http://www.fourthworld.com/rev



More information about the use-livecode mailing list