Re: [newbie] Changing keyboard layout within the CLI
On Tuesday 21 October 2003 04:42, Adolfo A. Bello B. wrote: > On Mon, Oct 20, 2003 at 11:11:22PM +0200, H.J.Bathoorn wrote: > > I did some pre-hunting;) > > > > There's a file "/etc/sysconfig/keyboard" that gets read by > > "/etc/init.d/keytable" and sets the keytable. > > This does need to be done in su/root status, though! > > > > So make a bash script (which you link to a key event or give a very > > short name that makes sense to you) that writes to > > /etc/sysconfig/keyboard and then initializes with "service keyboard > > restart". > > > > Good luck, > > HarM > > HarM: > > After some hunting I came to "loadkeys". As a normal user, now I can easily > switch the keyboard layout to spanish with "loadkeys es" and back to > us-english with "loadkeys us". > > After some googling and rtfm-ing I don't know what to do to bind/link > hotkeys to scripts or aliases in .bashrc. > > I would love to have something like ctrl-alt-u to switch to us-english and > ctrl-alt-e to switch to spanish. > > Reading about inputrc I got sort of lost. > > Could you point me in the right direction to achieve this? > > What I want to do is to switch keyborad layount from within mutt. > > I feel we are pretty close to the solution. > > Saludos, > > Adolfo I've never tried anything with /etc/inputrc so can't help you there. There are tricks to bind specific commands to certain key events by editing the .Xmodmap file i.e. change an existing keycode. Or add the alias to .bashrc or to /etc/bashrc for system wide usage. You could also create commands yourself i.e. "us" or "es" in /usr/sbin/ that run the desired "loadkeys *s" Good luck, HarM -- Registered Linux User #197998 FSF Associate Member #901 ICQ #146191606 Mandrake HowTo's & more: http://twiki.mdklinuxfaq.org Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [newbie] Changing keyboard layout within the CLI
On Mon, Oct 20, 2003 at 11:11:22PM +0200, H.J.Bathoorn wrote: > I did some pre-hunting;) > > There's a file "/etc/sysconfig/keyboard" that gets read by > "/etc/init.d/keytable" and sets the keytable. > This does need to be done in su/root status, though! > > So make a bash script (which you link to a key event or give a very short > name that makes sense to you) that writes to /etc/sysconfig/keyboard and then > initializes with "service keyboard restart". > > Good luck, > HarM HarM: After some hunting I came to "loadkeys". As a normal user, now I can easily switch the keyboard layout to spanish with "loadkeys es" and back to us-english with "loadkeys us". After some googling and rtfm-ing I don't know what to do to bind/link hotkeys to scripts or aliases in .bashrc. I would love to have something like ctrl-alt-u to switch to us-english and ctrl-alt-e to switch to spanish. Reading about inputrc I got sort of lost. Could you point me in the right direction to achieve this? What I want to do is to switch keyborad layount from within mutt. I feel we are pretty close to the solution. Saludos, Adolfo Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [newbie] Changing keyboard layout within the CLI
On Monday 20 October 2003 23:18, Adolfo A. Bello B. wrote: > On Mon, Oct 20, 2003 at 11:11:22PM +0200, H.J.Bathoorn wrote: > > I did some pre-hunting;) > > > > There's a file "/etc/sysconfig/keyboard" that gets read by > > "/etc/init.d/keytable" and sets the keytable. > > This does need to be done in su/root status, though! > > > > So make a bash script (which you link to a key event or give a very > > short name that makes sense to you) that writes to > > /etc/sysconfig/keyboard and then initializes with "service keyboard > > restart". > > > > Good luck, > > HarM > > HarM: > > Thanks a lot. I will give it a try tonight and let you know. > > See you around, > > Adolfo I didn't get a chance to see how KDE does it (i.e. on user level) so maybe there's a place to look into. Then again, changing a keyboard layout doesn't really have to be restricted to su/root IMO. Good hunting, HarM -- Registered Linux User #197998 FSF Associate Member #901 ICQ #146191606 Mandrake HowTo's & more: http://twiki.mdklinuxfaq.org Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [newbie] Changing keyboard layout within the CLI
On Mon, Oct 20, 2003 at 11:11:22PM +0200, H.J.Bathoorn wrote: > I did some pre-hunting;) > > There's a file "/etc/sysconfig/keyboard" that gets read by > "/etc/init.d/keytable" and sets the keytable. > This does need to be done in su/root status, though! > > So make a bash script (which you link to a key event or give a very short > name that makes sense to you) that writes to /etc/sysconfig/keyboard and then > initializes with "service keyboard restart". > > Good luck, > HarM HarM: Thanks a lot. I will give it a try tonight and let you know. See you around, Adolfo Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [newbie] Changing keyboard layout within the CLI
On Monday 20 October 2003 20:07, Adolfo A. Bello B. wrote: > On Mon, Oct 20, 2003 at 04:29:43PM +0200, H.J.Bathoorn wrote: > > Ahh, that's something I've never tried i.e. used. > > I know there's a terminal command: "setxkeymap es" to remap your keyboard > > on other WM's than kde. > > One can also "alias" to a shorter keystroke" or map it to a key on the > > keyboard. > > > > Alas I haven't found anything simular without the "x". > > > > Good hunting, > > HarM > > I am starting the hunt right now > > I'll let you know if I find something useful. > > Saludos, > > Adolfo I did some pre-hunting;) There's a file "/etc/sysconfig/keyboard" that gets read by "/etc/init.d/keytable" and sets the keytable. This does need to be done in su/root status, though! So make a bash script (which you link to a key event or give a very short name that makes sense to you) that writes to /etc/sysconfig/keyboard and then initializes with "service keyboard restart". Good luck, HarM -- Registered Linux User #197998 FSF Associate Member #901 ICQ #146191606 Mandrake HowTo's & more: http://twiki.mdklinuxfaq.org Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [newbie] Changing keyboard layout within the CLI
On Mon, Oct 20, 2003 at 04:29:43PM +0200, H.J.Bathoorn wrote: > Ahh, that's something I've never tried i.e. used. > I know there's a terminal command: "setxkeymap es" to remap your keyboard on > other WM's than kde. > One can also "alias" to a shorter keystroke" or map it to a key on the > keyboard. > > Alas I haven't found anything simular without the "x". > > Good hunting, > HarM I am starting the hunt right now I'll let you know if I find something useful. Saludos, Adolfo Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
Re: [newbie] Changing keyboard layout within the CLI
On Sunday 19 October 2003 21:18, Adolfo A. Bello B. wrote: > Hi there: > > Experimenting with VMWare for Windows and running Mandrake as the guest > OS my nvidia driver was wiped out, so I am now forced to work within the > CLI, at least until 9.2 is freely available for downloading. > > Is there any way to change the keyboard layout, let's say from > us-english to spanish, within the CLI? I really would like something > like ctrl-alt-k under KDE. > > TIA, > > Adolfo Hey Adolfo, You won't believe this: Use (as root/su): mcc then scroll to "keyboard configuration". mcc doesn't need X ;) Good luck, HarM -- Registered Linux User #197998 FSF Associate Member #901 ICQ #146191606 Mandrake HowTo's & more: http://twiki.mdklinuxfaq.org Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
[newbie] Changing keyboard layout within the CLI
Hi there: Experimenting with VMWare for Windows and running Mandrake as the guest OS my nvidia driver was wiped out, so I am now forced to work within the CLI, at least until 9.2 is freely available for downloading. Is there any way to change the keyboard layout, let's say from us-english to spanish, within the CLI? I really would like something like ctrl-alt-k under KDE. TIA, Adolfo Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com