DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 26th June 2008
mfaridi's Avatar
mfaridi mfaridi is offline
Spam Deminer
 
Join Date: May 2008
Location: Afghanistan
Posts: 282
Thanked 5 Times in 5 Posts
Default Keyboard Layout

I have use af and en keyboard , I do not want change xorg.conf
for use ad keybaord I use
Code:
setxkbmap af
and when I want us keyboard I use
Code:
setxkbmap us
how I can have this change automatically , I do not have type these codes
and I want change it with Alt+Shift keys.
Reply With Quote
  #2   (View Single Post)  
Old 26th June 2008
18Googol2's Avatar
18Googol2 18Googol2 is offline
Real Name: whoami
Spam Deminer
 
Join Date: Apr 2008
Location: pwd
Posts: 283
Thanked 20 Times in 18 Posts
Default

Quote:
Originally Posted by mfaridi View Post
how I can have this change automatically , I do not have type these codes
and I want change it with Alt+Shift keys.
So, set a hot key for those command. Not sure which WM you are using but if you happen to use Fluxbox, it can be configured within the file:

~/.fluxbox/keys
Reply With Quote
  #3   (View Single Post)  
Old 26th June 2008
richardpl richardpl is offline
Spam Deminer
 
Join Date: May 2008
Location: Croatia
Posts: 284
Thanked 25 Times in 24 Posts
Default

Add following lines under your "InputDevice" section in your xorg.conf file

Option "XkbLayout" "af,us"
Option "XkbOptions" "grp:alt_shif_toggle"

same thing can be done with command:

% setxkbmap -layout "af,us" -option "grp:alt_shift_toggle"
Reply With Quote
  #4   (View Single Post)  
Old 26th June 2008
lvlamb's Avatar
lvlamb lvlamb is offline
Real Name: Louis V. Lambrecht
Spam Deminer
 
Join Date: May 2008
Location: .be
Posts: 221
Thanked 25 Times in 24 Posts
Default

You would set a comma separated list of the keyboard layouts and define a key combination to toggle between them
in Xorg's config file as

Code:
Section "InputDevice"
    Identifier "Keyboard1"
    Driver "kbd"
    ....
    Option "XkbLayout" "af,us"
    Option "XkbOptions" "grp:alt_shift_toggle"
...

Alternatively at runtime

Code:
setxkbmap -rules xorg -model {the one in the xorg.conf, presumaby pc105} \
     -layout "af.us" -option  "grp:alt_shift_toggle"
Alternatively in the Window Manager, either configuration files , or applets or desklets or settings they provide
__________________
da more I know I know I know nuttin'
Reply With Quote
  #5   (View Single Post)  
Old 26th June 2008
mfaridi's Avatar
mfaridi mfaridi is offline
Spam Deminer
 
Join Date: May 2008
Location: Afghanistan
Posts: 282
Thanked 5 Times in 5 Posts
Default

Quote:
Originally Posted by 18Googol2 View Post
So, set a hot key for those command. Not sure which WM you are using but if you happen to use Fluxbox, it can be configured within the file:

~/.fluxbox/keys
Is use Gnome
Reply With Quote
  #6   (View Single Post)  
Old 26th June 2008
mfaridi's Avatar
mfaridi mfaridi is offline
Spam Deminer
 
Join Date: May 2008
Location: Afghanistan
Posts: 282
Thanked 5 Times in 5 Posts
Default

Quote:
Originally Posted by lvlamb View Post
You would set a comma separated list of the keyboard layouts and define a key combination to toggle between them
in Xorg's config file as

Code:
Section "InputDevice"
    Identifier "Keyboard1"
    Driver "kbd"
    ....
    Option "XkbLayout" "af,us"
    Option "XkbOptions" "grp:alt_shift_toggle"
...

Alternatively at runtime

Code:
setxkbmap -rules xorg -model {the one in the xorg.conf, presumaby pc105} \
     -layout "af.us" -option  "grp:alt_shift_toggle"
Alternatively in the Window Manager, either configuration files , or applets or desklets or settings they provide
Thanks
But I do not want change Xorg or type setxkbmap each time
Reply With Quote
  #7   (View Single Post)  
Old 26th June 2008
lvlamb's Avatar
lvlamb lvlamb is offline
Real Name: Louis V. Lambrecht
Spam Deminer
 
Join Date: May 2008
Location: .be
Posts: 221
Thanked 25 Times in 24 Posts
Default

You only have to edit the xorg.conf once. Then use shift+alt to switch.

Since you are on GBONE, you can install the keyboard applet. From there, you can edit a list of whatever keyboards. And, a plus, even call a graphic representation of the keyboard with the way to enter some characters.
Fwiw, XFCE4 has the keyboard pabnel applet, but just displays the current keyboard and does not switches yet. Havent't tried the shift+alt though.

Specific OpenBSD:
- you must first make sure you have a symlink
ln -s /etc/X11/xkb /usr/X11R6/lib/X11/xkb
- man kbd for the CLI, haven't found equivalents on other *BSDs
__________________
da more I know I know I know nuttin'
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
NetBSD 5 keyboard layout in gnome jaideep_jdof NetBSD Package System (pkgsrc) 1 17th September 2009 03:50 PM
Can not change keyboard layout with SHIFT and Alt after VNCviewer connect mfaridi OpenBSD General 1 13th December 2008 03:14 PM
Recommended Partition Layout MetalHead OpenBSD Installation and Upgrading 12 30th November 2008 10:08 AM
Project layout, any comments? PatrickBaer FreeBSD General 1 12th October 2008 05:13 PM
Keyboard delboy FreeBSD Installation and Upgrading 2 23rd May 2008 05:55 PM


All times are GMT. The time now is 11:33 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick