Professional Web Applications Themes

keyboard, last one used - Mac Programming

How does one tell which keyboard was the last one a key was typed on (as one example take a laptop with an external keyboard). I have tried the following attempts: Once upon a time, the GetNextEvent or WaitNextEvent would return the devtype (i.e. keyboard ADB type) as part of the message parameter for key events. - outdated. The LMGetKeybdLast() call appears to only give one keyboard even if two are connected. The Gestalt(gestaltKeyboardType, &response) call in carbon/classic does not always give an accurate number for the keyboard (i.e 4 instead of 204 for an Apple USB Extended keyboard). The ...

  1. #1

    Default keyboard, last one used

    How does one tell which keyboard was the last one a key was typed on (as
    one example take a laptop with an external keyboard).

    I have tried the following attempts:

    Once upon a time, the GetNextEvent or WaitNextEvent would return the
    devtype (i.e. keyboard ADB type) as part of the message parameter for
    key events. - outdated.

    The LMGetKeybdLast() call appears to only give one keyboard even if two
    are connected.

    The Gestalt(gestaltKeyboardType, &response) call in carbon/classic does
    not always give an accurate number for the keyboard (i.e 4 instead of
    204 for an Apple USB Extended keyboard).

    The Cocoa Appkit does not appear to have any call similar to this.

    Does anyone have a reliable way to do this? On carbon or cocoa?

    Alan Guest

  2. #2

    Default Re: keyboard, last one used

    In article <BxFMb.8231$netcom.ca>,
    Alan Hawrelak <com> wrote:
     

    What are you really trying to do?

    meeroh

    --
    If this message helped you, consider buying an item
    from my wish list: <http://web.meeroh.org/wishlist>

    Miro Guest

  3. #3

    Default Re: keyboard, last one used

    Miro Jurisic wrote: 
    >
    >
    > What are you really trying to do?
    >
    > meeroh
    >[/ref]

    For a terminal emulation program, which allows users to reconfigure
    their keyboard(s), this would allow the program to seamlessly detect
    which keyboard (and which keyboard configuration) was desired.

    Alan

    Alan Guest

Similar Threads

  1. Keyboard fun
    By Antony Gelberg in forum Debian
    Replies: 1
    Last Post: July 30th, 11:30 AM
  2. keyboard
    By black francis in forum Adobe Photoshop 7, CS, CS2 & CS3
    Replies: 1
    Last Post: July 29th, 01:51 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139