1. Re: more on Shift/Ctrl/Alt keys in Linux

On Sun, 28 Nov 1999, you wrote:
> On Sun, 28 Nov 1999, Dave Cuny wrote:
>
> Anyone have a clue how to determine if the Shift/Ctrl/Alt key is pressed in
> Linux? I'd like to support keystrokes such as:
>
> Shift+RightArrow
> Ctrl+PageDown
>
> but I don't know how to do this yet. Now that Euphoria/Linux has mouse
> support, I should add the mouse routines  back into the EE/Linux port.
>
> Thanks!
>
Dave:
Look for a file named defkeymap.map  -  it's probably in your /etc directory.
In that file are defined the codes returned by all keys and states.
It gets loaded on startup, but if you change it, you can re-load it by typing
loadkeys -d

........excerpt.................
keycode 101 = Break
keycode 102 = Find
keycode 103 = Up
   -- no ctl/shift/alt states are defined, so I added the following 3 lines:
        shift   keycode 103 = 89
        control keycode 103 = 90
        alt keycode 103 = 91
   --  now, when I run key.ex, it returns 89, 90 and 91 respectively.
   -- as far as I know, you can choose any unused number between 0 and 255
   -- to be the return code.   Be sure to get rid of these Euphoria comments!
 keycode 104 = Prior
        shift   keycode 104 = Scroll_Backward
keycode 105 = Left
        alt     keycode 105 = Decr_Console
keycode 106 = Right
        alt     keycode 106 = Incr_Console
keycode 107 = Select
keycode 108 = Down
keycode 109 = Next

Irv

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu