WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Keymaps switching  (Read 3140 times)

Offline KHarvey

  • Full Member
  • ***
  • Posts: 102
Keymaps switching
« on: June 15, 2012, 11:19:22 AM »
I apologize if this is not in the right forum.  I have been reading on kmaps for the past hour and I want to make sure what I want to do is not possible.

Is it possible to change keyboard maps while still in X?  I speak in both English (US) and Japanese and I would like the ability to change between the two keyboard maps.  So far the only way I have found to do this is if I close X, loadkmap, then startx.  I am running Xorg, is there a way for me to change on the fly?  Or by running a command without exiting X?

I am currently running an older version of TC (4.1) but I will be updating in the next couple of weeks to the newer version.

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11622
Re: Keymaps switching
« Reply #1 on: June 15, 2012, 12:40:46 PM »

Offline waterleat

  • Newbie
  • *
  • Posts: 6
Re: Keymaps switching
« Reply #2 on: June 18, 2012, 06:02:23 PM »
I followed 1st link as suggested by Rich  which does not quite deal with my problem But with no disrespect to AbNoRMiS reading of FAQ and Persistence section and ... and ... and by the time I had read the 6th set I have no idea what all the words mean! they are not really in plain English

I followed the 2nd link as suggested by Rich which is much nearer what I want but is no use because exiting to prompt gives me a "black screen of death" I am using acer laptop travelmate 292Lci which I had to use i915.modeset=1 when I installed Ubuntu 10.04. this poster ther had an Acer aspire but no acer specific solution mentioned.

I have version = 4.5.4
Using flwm topside (1st on CD) opt,home&tce = sda1 swap = sda2
I forgot keymap at boot I want it to be uk Where do I go to edit the bootcodes now that I have installed it on hard drive
If I boot from Cd it finds installed apps on hard drive and I can't do fresh install because partition already has OS on it. to me that is hardly live CD only perhaps that problem is dealt with elsewhere on the forum

I really like the concept of TCL but it sometimes appears that one needs a PhD in linux OS to follow some steps

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11622
Re: Keymaps switching
« Reply #3 on: June 18, 2012, 08:13:18 PM »
Hi waterleat
Quote
exiting to prompt gives me a "black screen of death"
Sometimes after hitting  Ctrl-Alt-Backspace  you need to hit the carriage return to get a prompt.
Quote
Where do I go to edit the bootcodes now that I have installed it on hard drive
Go to  /mnt/sda1/boot. One of the subdirectories there should contain a  .conf  file you can edit.

Offline AbNoRMiS

  • Hero Member
  • *****
  • Posts: 550
  • nothing can be impeccable in this imperfect world
    • @ß№®M!$
Re: Keymaps switching
« Reply #4 on: June 19, 2012, 09:47:23 AM »
if the following command will enable to switch your keyboard layouts
Code: [Select]
setxkbmap -layout 'us,jp' -option 'grp:ctrl_shift_toggle,grp_led:scroll'then you can make it permanent on boot
Code: [Select]
echo "setxkbmap -layout 'us,jp' -option 'grp:ctrl_shift_toggle,grp_led:scroll'" > ~/.X.d/setxkbmap
Basic Design Concept © @ß№®M!$
please forgive my terrible english :)

Offline waterleat

  • Newbie
  • *
  • Posts: 6
Re: Keymaps switching
« Reply #5 on: June 20, 2012, 06:29:00 PM »
Thank you Rich
Directory in my case is mnt/sda1/tce/boot/extlinux/extlinux.conf
however adding kmap=uk or keymap=uk does not change keymap in editor

Too late to investigate further tonight will look again tomorrow after work

Abnormis not tried your suggestions same reason as above and I think i am in xvesa I have not tried to use xorg

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Keymaps switching
« Reply #6 on: June 21, 2012, 05:02:08 AM »
@waterleat

The bootcode should be kmap=qwerty/uk. setxkbmap is only for Xorg.
The only barriers that can stop you are the ones you create yourself.

Offline KHarvey

  • Full Member
  • ***
  • Posts: 102
Re: Keymaps switching
« Reply #7 on: June 23, 2012, 12:48:59 PM »
I apologize for my late reply.

The links that Rich supplied kind of solved my problem.  I am able to change my keymaps by using setxkbmap.  But it isn't working quite the way that I thought it would.  It changes my keymap but it doesn't change the language, which makes sense.

I may create another thread with this question, since it is kind of different.  But is there a way to keep my kmap in US English and use UTF-8 fonts? 
I know that aterm does not support UTF-8 but I can use urxvtd instead (I think).  The problem is everything that I have seen with adding the UTF-8 support I have to edit my boot options, and specify a language and a kmap, but none have them have been US English.

What I am attempting to do is write a small English (Romaji) to Japanese (Hiragana / Katakana) python script for a friend.  But so far I have been unable to get any of the UTF-8 characters to work.  I keep receiving chr arg not in range(256).

I will be using TC 4.5.5 with Xorg and Fluxbox.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Keymaps switching
« Reply #8 on: June 23, 2012, 01:32:17 PM »
Fonts, language (translations, date formatting etc), console keymaps and xorg keymaps are all different things independent of each other.

So to write Japanese in Xorg you merely need a correct Xorg keymap and an editor supporting UTF-8; no need to change the system locale or console keymap. Unless you want Japanese locale etc too?
The only barriers that can stop you are the ones you create yourself.

Offline KHarvey

  • Full Member
  • ***
  • Posts: 102
Re: Keymaps switching
« Reply #9 on: June 23, 2012, 01:51:44 PM »
Excellent point curaga.  All the reading I have been doing in the forums has been centered around Xvesa.  Since I use Xorg I should just be editing the Xorg.conf and adding the languages and keymaps that I need.  I will go start reading on this now and see if I can figure it out.

As for the console goes, I don't really need to change the local or the keymap per se, but I want to be able to display the proper utf-8 characters.  Since I do not plan on building a GUI with the Python script, this means that I will need to use urxvtd.  It will just be a simple console script.  I had thought of attempting a shell script at first to do this, but decided that I wanted it to be a little more cross platform, so that is why is chose Python.

Offline waterleat

  • Newbie
  • *
  • Posts: 6
Re: Keymaps switching
« Reply #10 on: June 24, 2012, 06:50:07 AM »
@Cugar
@waterleat

The bootcode should be kmap=qwerty/uk. setxkbmap is only for Xorg.
Thank you that has fixed my keyboard problem as I am only using Xvesa. I think I will stick with that as there is probably video issues with my Acer laptop and Xorg.