Re: Daydreaming
Re: Daydreaming
- Subject: Re: Daydreaming
- From: "Nathaniel Gray" <email@hidden>
- Date: Tue, 20 Nov 2007 14:59:56 -0800
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)
This email sent to email@hidden