realbasic-nug
[Top] [All Lists]

Re: Function key

To: REALbasic Network Users Group <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Function key
From: Boris Segerstahl <seger at sun3 dot oulu dot fi>
Date: Wed, 31 Jul 2002 09:59:53 +0300
A few months ago I put the following code into an editfield.keydown event as a boilerplate to catch the function keys. I hope it helps:
-------------------------------------------
  dim i  as integer
  dim keystr as string

  keystr = "122,120,99,118,96,97,98,100,101,109,103,111,105"

  for i = 1 to countfields(keystr,",")
    If Keyboard.AsyncKeyDown(val(nthfield(keystr,",",i))) then
me.text = "functionkey was F" + str(i) + "=" + nthfield(keystr,",",i) + " (I hope)"
      exit
    end if
  next
  // Note that F4 will paste the clipboard into the editfield!?
  // I don't understand what F14 and F15 are doing
  // F1=122,  F2=120, F3=99, F4=118, F5=96,  F6=97, F7=98
  // F8=100, F9=101, F10=109, F11=103, F12=111, F13=105
 ----------------------------------------------------

At 11:02 PM +0200 7/29/02, Philip Zvar wrote:

I did, and I get ASCII value 122 as a result. But 122 is a "z" in the ASCII
table.



Boris

_______________________________
Boris Segerstahl
seger at cc dot oulu dot fi



<Prev in Thread] Current Thread [Next in Thread>