| Some of you might be interested in this exchange about sensekey between Rory
and myself.
Art Hunkins
----- Original Message -----
From: "Art Hunkins"
To: "Rory Walsh"
Sent: Sunday, September 16, 2007 4:10 PM
Subject: Re: Sensekey issue with Lettuce/API
> Hi, Rory,
>
> Not to worry - I've found a workaround.
>
> Instead of using the Num Lock key to access the shifted (and currently
> unavailable characters), I've programmed a pair of keypad keys (either /*
> or -+) as a switch to assign alternative meanings to the numeric keys.
>
> This actually works better for several reasons:
> 1) key 5 doesn't have a shifted function (neither does Backspace if this
key
> exists)!
> 2) the 00/000 key has either no shifted function or a comma.
>
> In other words, keypads are not always standard, and most of the trouble
> occurs with shifted functions.
>
> One thing I have found is that sensekey works fine with keypads, gamepads
> (through game port or USB) and even joysticks with programmable buttons.
The
> downside is that none of these are compatible, and all the gamepads
require
> unique software to program their keys (though it's nice that keys can
> usually be assigned *sequences* of keystrokes).
>
> Take care now -
>
> Art H.
>
> ----- Original Message -----
> From: "Rory Walsh"
> To: "Art Hunkins"
> Sent: Sunday, September 16, 2007 2:50 PM
> Subject: Re: Sensekey issue with Lettuce/API
>
>
> > Hi Art, I've taken a look at this and it is down to a routine that I
> > call in my Lettuce standalones. Looking at the source it looks like a
> > biggy to fix or modify. I will put it on my todo list, but I have to say
> > that that list is getting rather out of hand at the moment! You know the
> > way it is with new semesters, I can't believe the summer has come and
> > gone.. oh well, you know what the say about giving a busy man something
> > to do!
> >
> > Art Hunkins wrote:
> > > I've discovered a rather obscure issue with sensekey when run in
Lettuce
> > > executable format. Basically, sensekey returns different data when run
> from
> > > the commandline vs. through Lettuce/API. (I say "Lettuce/API" as I've
no
> > > idea which may be responsible for the differences.)
> > >
> > > The attached .csd demonstrates these differences. Run from the
> commandline,
> > > sensekey is wonderful: shifted numerics give different ASCII values,
as
> does
> > > Caps Lock; the "format keys" (Insert/Delete, Home/End, Page Up/Down)
and
> the
> > > cursor keys all give appropriate ASCII output.
> > >
> > > Not so with Lettuce/API. Though shift works appropriately with
> > > non-alphabetic characters, Caps Lock does not; it gives the same ASCII
> > > output as unshifted characters. More importantly, it does not output
> ASCII
> > > for either the "format" or cursor keys. This is likely why on the
> extended
> > > keypad, an *unlocked* Num Lock doesn't output any ASCII values for
> > > keypresses either (the unlocked functions being those same "format"
and
> > > cursor keys).
> > >
> > > The only reason why any of this is important to me is that I'm trying
to
> do
> > > versions of a few of my pieces with only an extended keypad as
> controller.
> > > And I'm in need of some of these unlocked Num Lock functions (not
enough
> > > keys otherwise).
> > >
> > > I'd appreciate Rory and others looking at this situation and trying to
> > > determine the reason for the described differences in behavior. Anyone
> with
> > > Lettuce and ASCII keyboard (with extended keypad) can run the
attachment
> > > both ways. When running the Lettuce executable, start Csound and open
> the
> > > std output window, but *select* the main performance window.
(Otherwise
> keys
> > > pressed will appear as *text* in std out.)
> > >
> > > Thanks very much.
> > >
> > > Art Hunkins
> |