You are not logged in.

#1 2011-09-19 21:57:14

blin
Member
From: Saint-Petersbur, Russia
Registered: 2010-10-31
Posts: 17

How can i bind something to caps lock in AwesomeWM?

Recently i've aquired new notebook which doesn't have caps_lock, num_lock and scroll_lock LEDs, so i decided to put keyboard layout indicator to system tray.
Currently i am using Xorg config to set XkbLayout and XkbOptions (like so http://paste.pocoo.org/show/478789/ ).
I tried first widget from http://awesome.naquadah.org/wiki/Change_keyboard_maps but soon realized that it does not detect layout change in any way, so i would like to bind kbdcfg.switch function to caps_lock, but i can't find any documentation on binding something to caps_lock.
Also i've noticed a strange thing, when i change my layout with this function i am unable to use shortcuts that use latin letters. They are obviously remapped to by сyrillic, but they do work if i change my layout with caps_toggle. Why do the work with caps_toggle, and how can i make them work with kbdcfg.switch?


PS1='[$(date +%H:%M:%S) - \H] \n[$(pwd)]\$ '

Offline

#2 2011-09-20 13:12:24

filam
Wiki Maintainer
From: Portland, ME
Registered: 2008-04-11
Posts: 158
Website

Re: How can i bind something to caps lock in AwesomeWM?

Is there a reason you're not using xmodmap? You may also want to read the Extra Keyboard Keys in Xorg article.

Offline

#3 2011-09-20 15:40:45

blin
Member
From: Saint-Petersbur, Russia
Registered: 2010-10-31
Posts: 17

Re: How can i bind something to caps lock in AwesomeWM?

filam wrote:

Is there a reason you're not using xmodmap? You may also want to read the Extra Keyboard Keys in Xorg article.

The only reason i have for not using xmodmap is, i don't understand how it can help me, with the task i have. The other article didn't help me either.
I've successfully switched to xxkb, but i still would like to know answers to my questions, for the sake of curiosity.


PS1='[$(date +%H:%M:%S) - \H] \n[$(pwd)]\$ '

Offline

#4 2011-09-20 18:44:45

rwd
Member
Registered: 2009-02-08
Posts: 664

Re: How can i bind something to caps lock in AwesomeWM?

Is suspect the answer is not what you want because your question is not very clear. I understand that you have a keyboard that is lacking certain keys. What is it that you want to achieve? Let some key act as capslock?

Offline

#5 2011-09-20 19:19:31

filam
Wiki Maintainer
From: Portland, ME
Registered: 2008-04-11
Posts: 158
Website

Re: How can i bind something to caps lock in AwesomeWM?

blin wrote:
filam wrote:

Is there a reason you're not using xmodmap? You may also want to read the Extra Keyboard Keys in Xorg article.

The only reason i have for not using xmodmap is, i don't understand how it can help me, with the task i have. The other article didn't help me either.

Did you read the "How to find capslock status?" thread?

blin wrote:

Is suspect the answer is not what you want because your question is not very clear. I understand that you have a keyboard that is lacking certain keys. What is it that you want to achieve? Let some key act as capslock?

I had to read the OP twice to understand it. I didn't notice that he wrote "LED" in the first sentence. What he wants is for his Awesome status bar to display the current activity (i.e. on/off) of the Caps Lock, Num Lock and Scroll Lock keys. He does not need to remap any keys.

Edit: Check Retrieving CAPS LOCK info using Xlib or just do a Google search for "linux caps lock status -map -disable".

Last edited by filam (2011-09-20 19:43:45)

Offline

Board footer

Powered by FluxBB