Csound Csound-dev Csound-tekno Search About

[Cs-dev] [SPAM] Re: Sensekey/Linux/OLPC Issue

Date2009-01-01 20:48
From"Art Hunkins"
Subject[Cs-dev] [SPAM] Re: Sensekey/Linux/OLPC Issue
I've discovered the answer to the Enter key problem: Linux considers it 
ASC10 (LF) whereas Windows considers it ASC13 (CR) (I'm just getting into 
the history of and differences between OS's.)

I'm assuming the best way to handle this is to test for *both* ASC10 and 
ASC13 (that seems to work both on OLPC and Windows anyway). Will that work 
for all systems, including Mac? Or should I look for another keystroke to 
use (like Space, perhaps)? I'd really like to keep using the Enter key if 
possible.

So now there's just the problem of Linux' printing the sensekey characters 
to the screen (which Windows doesn't). I'd appreciate some advice on that, 
as well as information about Mac systems act in this regard.

Art Hunkins

----- Original Message ----- 
From: "Art Hunkins" 
To: 
Sent: Wednesday, December 31, 2008 5:36 PM
Subject: Sensekey/Linux/OLPC Issue


> I've finally gotten a little into Linux through the OLPC, and have 
> encountered a significant problem with sensekey. Sensekey doesn't work the 
> same in Windows as on the OLPC, in console/terminal mode. Here's what 
> happens:
>
> 1) In Windows, sensekey intercepts all ASCII input and doesn't print 
> anything to the console. The result is no significant computing time lost 
> that can cause audio glitches. It handles Return/Enter (ASC13) just like 
> other input. Result: no problems.
>
> 2) In Linux (at least the OLPC), sensekey, while doing generally as 
> expected with input, also prints it to the terminal. This takes additional 
> time and causes audio glitches. In addition, it does an actual CR/LF for 
> Enter, and does not intercept it as ASC13 for Csound. In Csound it's like 
> ASC13 wasn't pressed.
>
> A complicating factor is that every half-second I am printing a single 
> refreshing line to the console that displays the off/on state of all 
> ASCII-key triggers. The printing of keystrokes to the screen of course 
> completely muddles my refreshing line.
>
> I've the feeling that if the OLPC simply didn't print to the screen, 
> everything would be OK (with the possible exception of the Enter/Return 
> key issue?)
>
> Right now this is making all my composition variants that use the ASCII 
> keyboard as controller unworkable on Linux (affecting 6 or so pieces of 
> mine). I've been completely unaware of this inconsistency until now.
>
> Perhaps someone could advise me as to how sensekey behaves on the Mac too. 
> (Hopefully, like Windows?)
>
> In my view, sensekey behavior should be the same on all platforms.
>
> I'd appreciate all the developer help I can get on this - and/or show me 
> what I don't understand. Perhaps there's a workaround; but frankly I hope 
> this one can be *fixed* - i.e., made consistent one way or the other.
>
> BTW, this issue is mentioned in the Csound Journal article I've just 
> submitted, having to do with live Csound, "ideal" MIDI controllers, and 
> (incidentally) the ASCII keyboard as controller.
>
> Thanks as always - and Happy New Year,
>
> Art Hunkins 


------------------------------------------------------------------------------
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net