Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Daydreaming



On Nov 20, 2007 12:12 PM, Derek Fawcus <email@hidden> wrote:
> On Tue, Nov 20, 2007 at 07:09:50PM +0100, Harald Hanche-Olsen wrote:
> >
> > No:  Only to one of four predefined modifiers, or to nothing at all.
> > And then it is utterly undistinguishable from the other modifier
> > key(s) similarly defined.  How I would love to be able to give
> > different definitions to the left and right command keys ...
>
> Hmm - is it command that only has the one virtual keycode?
>
> I believe some of the others (ctrl, shift, alt?) have two,  and some
> OSX apps can distinguish between them.
>
> Certainly the mac keyboards generate seperate scan codes (X under Linux
> on my MacBook could distinguish the keys).

xev shows me different scan codes and key bindings for left/right
shift, cmd, and option.  Control is swapped with caps-lock on my
machine, but I'll bet I would get separate codes for Control_L and _R.

This may have changed since Tiger -- I seem to remember not being able
to distinguish them before.

Cheers,
-n8

BTW, if you really want to go nuts with keyboard remapping, look at
the event taps API.  I wrote a 100-line program that swaps ctrl and
cmd in Terminal.app (and *only* in Terminal.app) without any code
injection, input managers, or unsupported APIs.  You can just as
easily do system-wide filtering.  My modded my code and wrote a filter
that remaps the numeric keypad to match the space numbers in a 3x3
spaces layout (1 2 3 on top, 7 8 9 on bottom), and it only takes
effect if the ctrl key is held down.  Fun stuff.

-- 
>>>-- Nathaniel Gray -- Caltech Computer Science ------>
>>>-- Mojave Project -- http://mojave.cs.caltech.edu -->
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/x11-users/email@hidden

This email sent to email@hidden

References: 
 >Daydreaming (was: Re: 1.3a1) (From: "Ambrose Li" <email@hidden>)
 >Re: Daydreaming (was: Re: 1.3a1) (From: "Jordan K. Hubbard" <email@hidden>)
 >Re: Daydreaming (was: Re: 1.3a1) (From: "Ambrose Li" <email@hidden>)
 >Re: Daydreaming (From: Harald Hanche-Olsen <email@hidden>)
 >Re: Daydreaming (From: Derek Fawcus <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.