You are not logged in.

#1 2010-11-15 20:45:42

gwynevall
Member
Registered: 2010-11-15
Posts: 3

Alt keys in Xorg keyboard

I have a following problem, or a wish I'd say:
I would like to have both alt keys working in xorg (ratpoison WM) as they do in console.
What I would like to accomplish is to have my Alt keys working in xorg in ncurses based program where I need to change tabs with alt+numbers. Unfortunatelly, the only thing I get after pressing alt+numbers is: a plus-minus sign, superscritp numbers etc.
Any help wolud be appreciated. It seemed to be an easy task - disable some alt shortcuts, but I am completely stuck with it.
Thank you in advance.

Offline

#2 2010-11-15 20:59:41

milomouse
Member
Registered: 2009-03-24
Posts: 940
Website

Re: Alt keys in Xorg keyboard

Not sure if I completely understand this - both Alt keys work for your curses program in console but not X.Org? If this is the case I think maybe you need to "reassign" your Alt keys if X.Org is somehow changing them. Your keycodes may vary.. try using 'xev' to identify them if so.

xmodmap -e "keycode 64 = Alt_L"
xmodmap -e "keycode 108 = Alt_R"
xmodmap -e "clear Mod1"
xmodmap -e "add Mod1 = Alt_L Alt_R"

Or maybe just assign Alt_R as Alt_L if that's the only one recognized during X. Just some ideas, anyway. Also make sure your .ratpoisonrc doesn't have the Alt+number keys mapped to something else, although I don't think this is a problem if you're getting output in your curses program.

Offline

#3 2010-11-15 21:30:24

gwynevall
Member
Registered: 2010-11-15
Posts: 3

Re: Alt keys in Xorg keyboard

milomouse wrote:

Not sure if I completely understand this - both Alt keys work for your curses program in console but not X.Org?

Yes, exactly.
Thank you for your answer, it has not solved the problem directly, but I was pointed in a right direction, I think. I will post here, if i come to a solution.
Thank you again.

Offline

#4 2010-11-16 04:20:50

milomouse
Member
Registered: 2009-03-24
Posts: 940
Website

Re: Alt keys in Xorg keyboard

Good to know, and glad I could be of some help. As a note, it might be useful to know what ncurses program you're trying to get this to work in. Any other programs affected by the Alt key anomaly or is it just this one program?

Offline

Board footer

Powered by FluxBB