Ask a Question related to Mac Programming, Design and Development.
-
patric #1
Mac Keycodes
I looked in the INSIDE MACINTOSH series for the proper keycode for the
slash "/". It stated that the the hex code was F2. Is there a
different keycode for the slash key in the numeric keypad? The INSIDE
MACINTOSH gave them the same keycode, but I have a program I am
sending POSTEVENTs to, and yet the program doesn't like the keycode I
am sending. The program likes the "/" from the numeric keypad as
opposed to the "/" nect to the shif key. Any ideas?
Thanks.
Patric
patric Guest
-
Problems with KeyCodes for multiple keys?
Hello all. I have been trying to setup a key press functions for shortcuts wihtin my web app. Basicaly when a user presses (ALT+L) it will take them... -
patric #2
Re: Mac Keycodes
"James W. Walker" <osxNOSPAM@jwwalker.com.invalid> wrote in message news:<290820031958369229%osxNOSPAM@jwwalker.com.in valid>...
Yes, I accidentally swapped the 2F. No, my intent is to pass a key to> In article <1ec975dc.0308291209.48a5b2df@posting.google.com >, patric
> <patrick_cusack@hotmail.com> wrote:
>>> > I looked in the INSIDE MACINTOSH series for the proper keycode for the
> > slash "/". It stated that the the hex code was F2. Is there a
> > different keycode for the slash key in the numeric keypad? The INSIDE
> > MACINTOSH gave them the same keycode, but I have a program I am
> > sending POSTEVENTs to, and yet the program doesn't like the keycode I
> > am sending. The program likes the "/" from the numeric keypad as
> > opposed to the "/" nect to the shif key. Any ideas?
> Do you mean key code or character code? The character code for '/' is
> 2F. The key code on the main keyboard is 2C, and the key code on the
> numeric keypad is 4B. None of them is F2.
a POSTEVENT routine. However, The program that I am sending it to sees
it as the non-numeric "/", whereas I wish to send the "/" from the
numeric keyboard. Any suggestions? POSTEVENT requires an eventmsg - I
assume it means an ascii character? I only wish to somehow
differentiate between the two slashes.
Thanks
patric Guest
-
James W. Walker #3
Re: Mac Keycodes
In article <1ec975dc.0308292231.41761043@posting.google.com >, patric
<patrick_cusack@hotmail.com> wrote:
The message field of the event record contains both the character code> Yes, I accidentally swapped the 2F. No, my intent is to pass a key to
> a POSTEVENT routine. However, The program that I am sending it to sees
> it as the non-numeric "/", whereas I wish to send the "/" from the
> numeric keyboard. Any suggestions? POSTEVENT requires an eventmsg - I
> assume it means an ascii character? I only wish to somehow
> differentiate between the two slashes.
(in the low byte) and the key code (in the next byte).
James W. Walker Guest
-
Simon Slavin #4
Re: Mac Keycodes
In article <1ec975dc.0308292231.41761043@posting.google.com >,
[email]patrick_cusack@hotmail.com[/email] (patric) wrote:
They are different keys and therefore have different numbers.>Yes, I accidentally swapped the 2F. No, my intent is to pass a key to
>a POSTEVENT routine. However, The program that I am sending it to sees
>it as the non-numeric "/", whereas I wish to send the "/" from the
>numeric keyboard.
They'll also have different numbers on different keyboards.
If you want to know what number a certain key generates, the
simplest method is to write a program which tells you the
number of each key pressed.
Simon Slavin Guest
-
patric #5
Re: Mac Keycodes
"James W. Walker" <osxNOSPAM@jwwalker.com.invalid> wrote in message news:<300820030039226756%osxNOSPAM@jwwalker.com.in valid>...
James,> In article <1ec975dc.0308292231.41761043@posting.google.com >, patric
> <patrick_cusack@hotmail.com> wrote:
>>> > Yes, I accidentally swapped the 2F. No, my intent is to pass a key to
> > a POSTEVENT routine. However, The program that I am sending it to sees
> > it as the non-numeric "/", whereas I wish to send the "/" from the
> > numeric keyboard. Any suggestions? POSTEVENT requires an eventmsg - I
> > assume it means an ascii character? I only wish to somehow
> > differentiate between the two slashes.
> The message field of the event record contains both the character code
> (in the low byte) and the key code (in the next byte).
Thanks for your patience. That worked brilliantly. I looked at the
apple IM series for the description of the event record. Yet, I
noticed that it did not have any fields for any modifier keys. I guess
I could use PPostevent for that, but as it is not supported in Carbon,
I am reluctant to use it. Thanks.
Patric
patric Guest
-
James W. Walker #6
Re: Mac Keycodes
In article <1ec975dc.0309012233.70082496@posting.google.com >, patric
<patrick_cusack@hotmail.com> wrote:
Under OS 9, you could load the PPostEvent function pointer from> Yet, I
> noticed that it did not have any fields for any modifier keys. I guess
> I could use PPostevent for that, but as it is not supported in Carbon,
> I am reluctant to use it.
InterfaceLib using CFM routines (I forget the exact ones). Under OS X,
you can use CGPostKeyboardEvent instead.
James W. Walker Guest



Reply With Quote

