Slackware This Forum is for the discussion of Slackware Linux.
|
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
07-09-2004, 10:10 PM
|
#1
|
|
LQ Newbie
Registered: Mar 2003
Location: Bellevue, WA
Posts: 17
Rep:
|
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!
|
|
|
|
07-11-2004, 01:08 PM
|
#2
|
|
Member
Registered: May 2004
Distribution: Slackware C
Posts: 274
Rep:
|
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
|
|
|
|
07-11-2004, 03:29 PM
|
#3
|
|
LQ Newbie
Registered: Mar 2003
Location: Bellevue, WA
Posts: 17
Original Poster
Rep:
|
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!
|
|
|
|
07-11-2004, 04:56 PM
|
#4
|
|
Senior Member
Registered: Mar 2004
Distribution: Slackware
Posts: 4,282
Rep:
|
What is the program which need qwerty keyboard, just curious.
|
|
|
|
07-11-2004, 05:04 PM
|
#5
|
|
LQ Newbie
Registered: Mar 2003
Location: Bellevue, WA
Posts: 17
Original Poster
Rep:
|
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.
|
|
|
|
07-11-2004, 06:10 PM
|
#6
|
|
Senior Member
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607
Rep:
|
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.
|
|
|
|
07-11-2004, 07:11 PM
|
#7
|
|
LQ Newbie
Registered: Jun 2004
Posts: 5
Rep:
|
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.
|
|
|
|
07-11-2004, 08:45 PM
|
#8
|
|
Senior Member
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607
Rep:
|
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 08:23 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|