LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 07-09-2004, 10:10 PM   #1
stting
LQ Newbie
 
Registered: Mar 2003
Location: Bellevue, WA
Posts: 17

Rep: Reputation: 0
Changing keyboard mapping for xterm in xwindow


Hello,

I am wondering whether it is possible to remap the keyboard for only a single instance of a terminal (i.e. xterm) in xwindows?

I have my keyboard set to dvorak in general, but a certain application requires me to use the qwerty layout because of the arrangement of keys. What I want to do is be able to just start xterm and enter some command to change the layout for that xterm so that any subsequent applications run from that terminal use the qwerty layout. However, all other windows in X and the other consoles should still use the dvorak layout.

Is this possible?

Thanks!
 
Old 07-11-2004, 01:08 PM   #2
marlor
Member
 
Registered: May 2004
Distribution: Slackware C
Posts: 274

Rep: Reputation: 30
ok

what you need to do is to edit your xfree or xorg.conf which is located in /etc/X11/

there you will kind this section:

Code:
# **********************************************************************
# Core keyboard's InputDevice section
# **********************************************************************
under that that you should have something like:

Code:
Section "InputDevice"
    Identifier	"Keyboard1"
    Driver	"Keyboard"
    Option     "XkbLayout"     "be"

EndSection
if "Option "XkbLayout" " has a # infront of it, then remove it

my keyboard is azerty which is belgian keyboard which makes it "be"

what you have to do is change the "be" to your country code. as i remember default was "us"



good luck
 
Old 07-11-2004, 03:29 PM   #3
stting
LQ Newbie
 
Registered: Mar 2003
Location: Bellevue, WA
Posts: 17

Original Poster
Rep: Reputation: 0
Yes, I have done that already. I am able to get X to run with the dvorak keyboard layout. However, what I want to be able to do is open up a terminal window in X (that currently uses the dvorak layout), run a command to change only _that_ terminal to a qwerty layout, and then be able to run a program from that terminal using the qwerty layout while the rest of X uses the dvorak layout. I don't want to have to edit the file and restart X.

Hope this makes sense.

Thanks!
 
Old 07-11-2004, 04:56 PM   #4
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,445

Rep: Reputation: 94
What is the program which need qwerty keyboard, just curious.
 
Old 07-11-2004, 05:04 PM   #5
stting
LQ Newbie
 
Registered: Mar 2003
Location: Bellevue, WA
Posts: 17

Original Poster
Rep: Reputation: 0
Oh, they are FPS games, namely America's Army and Wolfenstein: Enemy Territory. Some newer games automatically remap the keys if you are in a different layout, but not these. In principal, I can manually relay all the keybindings in the game, but I'd rather not do that.
 
Old 07-11-2004, 06:10 PM   #6
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
Pardon my ignorance, but wouldn't it be easier to just change the keybindings in the game itself? I'd be very surprised if these two games did not allow custom keys to be chosen by the player for switching weapons, moving around, etc.
 
Old 07-11-2004, 07:11 PM   #7
cerrayon
LQ Newbie
 
Registered: Jun 2004
Posts: 5

Rep: Reputation: 0
Yes, as I mentioned in the previous post, that is one way to do it. All I'm wondering is if there's a simpler way rather than manually changing all keybindings within the game.
 
Old 07-11-2004, 08:45 PM   #8
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
Well, I think that's what I was asking; how is it simpler to 1) get xterm to specify a specific instance (the one where you're playing the game, rather than the one where you're installing something with pkgtool or whatever else one might do in an xterm), and then 2) change the keyboard layout for that instance and 3) pass the changed layout to the program running in the Xterm (which may not even accept this action), than it is to 1) change the configuration of the keys in the application once? Unless of course, you play these games with both kinds of keyboard, so you'd need to switch them, depending on which keyboard you happened to be using at the time.

Perhaps you could write a short script to start these games. One which would either start the game in a new instance of X that used a different configuration file (changing the keyboard), or one which exported the keyboard map variable before starting the game.

Just an idea, as I have never had to change my keyboard map on the fly, or for a limited period, but maybe it will help.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Keyboard mapping cdhjrt Linux - Software 5 11-03-2005 04:29 PM
keyboard re-mapping bong.mau Linux - Software 1 10-26-2005 12:01 PM
Changing IP mapping? Numbr08 Linux - Newbie 0 10-13-2004 04:26 PM
Keyboard Mapping ZeroX-2 Slackware 4 10-02-2004 07:58 PM
X and keyboard mapping krajzega Slackware 1 02-24-2004 07:34 PM


All times are GMT -5. The time now is 05:17 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration