[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Caps lock problem



On Fri, Mar 12, 2004 at 12:00:31AM +0100, Slaanesh wrote:
> Hi folks,
> 
> In the Microsoft Windows world, one has to use the shift key to disable 
> the caps lock mode whereas in the Unix world, and indeed under Debian 
> GNU/Linux, one has to hit caps lock key again.
> I would like to know if someone could tell me how to configure my 
> keyboard to act the Microsoft way instead of the standard way ?

I had never realized this.  This was interesting so I started looking.

I'm sure others can improve on this, but for the console you can define
a custom keymap as follows.

>From the "man keymaps":

       The  following  entry  sets the Shift and Caps Lock keys to behave more
       nicely, like in older typewriters. That is, pressing Caps Lock key once
       or  more sets the keyboard in CapsLock state and pressing either of the
       Shift keys releases it.

              keycode  42 = Uncaps_Shift
              keycode  54 = Uncaps_Shift
              keycode  58 = Caps_On

(see also loadkeys for loading a custom keymap).


For X (I'm not very experienced with modifying X so take this for
whatever it's worth to you):

Using xmodmap one can change X like this:

    clear Lock
    keycode 66 = Shift_Lock
    add Lock = Shift_Lock

(I think 66 is the right keycode, I actually have mine changed so that
 is the control key).

I noticed my keyboard LED no longer lights up (since it indicates Caps
Lock not Shift Lock I guess. :)  Although this was only in X, on the
console it behaved normally.

I hope this starts you looking in the right direction.  As I said, I
haven't done this before.

> 
> -- 
> Slaanesh
> 

-- 

Chris Harris <charris@rtcmarketing.com>
-------------------------------------------
GNU/Linux --- The best things in life are free.



Reply to: