Re: [AD] Allegro keyboard under Linux

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Tue, Oct 19, 1999 at 02:12:23PM +0200, Grzegorz Adam Hankiewicz wrote:
> Hello.
> 
> As you all probably know, under Linux you can use Alt-arrow key to switch
> VC. This sequence is catched by Allegro, since as George once pointed,
> there's a lot of games which would relay on that key combination to move
> the game car, ship, whatever.

Sort of, it's not so much that that combination is caught, more
that Allegro doesn't pass it back to the kernel.  I'm not sure
why (not that I've looked); if you want to find out, have a look
at the Linux keyboard code and find out what Alt+Arrow is
returning from the ioctl.

Basically, we read the keyboard raw, receiving all keypresses,
then pass them to the kernel asking it to tell us what they
mean, based on the current keyboard map (e.g. which letter, is
it Ctrl+something, is it a console switch).  Then there are
special cases for some things, like console switches, where we
call the kernel again telling it to start the switch.  I'm
surprised that Alt-Arrow doesn't fall into this category, but if
we're going to pass these on to the kernel too then we'll need
to find out what exactly comes back from the ioctl in this case.

> However, is it possible to disable this feature? I have a few console
> programs which use the keyboard, and it would be great if the alt-key
> combination worked there too.

One other thing -- note that when you switch *to* an Allegro
program, it assumes that all modifiers have been released, so in
any case you must let go of Alt and press it again, if you're
browsing through the consoles.

-- 
George -- still no real internet connection :(



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/