LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   keyboard mapping file (https://www.linuxquestions.org/questions/slackware-14/keyboard-mapping-file-877751/)

Shao Lung 04-29-2011 12:53 AM

keyboard mapping file
 
Here is an interesting question where do I find the keyboard file for example
/etc/X11/xkb/symbols
has a reference for all the number pad and page uppage down end and so on.

Code:

xkb_symbols *overla1*{
  // begin *keypad* section
  key <kp7> {        [KP_Home          ], overlay1=<k07  };
  key <kp8> {        [KP_Up            ], overlay1=<k08> };

etc.. you get the idea

I would like to know where to find the file for standard keyboard basic letters and so on.

Thanks in advance. I am sure it is all run on code as such, with the exception of ctrl/alt/del which is hard coded in bios,, or at least used to be.

thank you in advance.

Shao Lung 04-29-2011 04:14 AM

found it .

zhjim 04-29-2011 04:20 AM

Where?

Shao Lung 04-29-2011 10:50 AM

Quote:

Originally Posted by zhjim (Post 4340395)
Where?

/usr/share/X11/xkb/symbols/ca would be the canadian key board configuration

/usr/share/X11/xkb/symbols/pt would be the portugese (sp) key board configuration,, you get the idea.

I thinkill play with the canadian one, cause I use an american keyboard configuration, and well I understand the canadian configuration.

lol Im going to turn it into a leet speak configuration.
If someone beats me to it,share up the code :)

zhjim 04-29-2011 01:01 PM

w4y 2 90 :D

Shao Lung 04-29-2011 03:06 PM

Quote:

Originally Posted by zhjim (Post 4340973)
w4y 2 90 :D

7#@~x5 1 72'/ :)

Shao Lung 04-29-2011 05:26 PM

ok I marked this as unsolved. I figured since im still working on the project I might as well put all questions regarding keyboard mapping here.
I have fully designed, or redesigned the canadian keyboard configuration.
I have done the following


Code:

cp /usr/share/X11/xkb/symbols/ca /usr/share/X11.xkb/symbols/ca_back
I am curious, and perhaps a little nervous about trying this, I would hate to mess up my awesome install of slackware.

How do I go about setting my keyboard mapping to use the canadian one.

Is it possible to set up an easy switch between keyboard mapping? I have never done this before, so Hence my question, as I would like to switch back from canadian keyboard mapping to american mapping.

Would anyone like me to post the leet board mapping so they can play with it?

This is the listing of the keyboard mapping changes I have done.
Code:

a=4  b=8  c=(
d=∂  e=£  f=}
g=9  h=#  i=!
j=¿  k=x  l=1
m=M  n=~  o=0
p=q  q=&  r=Я
s=5  t=7  u=µ
v=√  w=Ш  x=*
y=j  z=2

All thanks in advance.

imitheos 04-29-2011 05:39 PM

Quote:

Originally Posted by shao Lung (Post 4341284)


I am curious, and perhaps a little nervous about trying this, I would hate to mess up my awesome install of slackware.

How do I go about setting my keyboard mapping to use the canadian one.

Is it possible to set up an easy switch between keyboard mapping? I have never done this before, so Hence my question, as I would like to switch back from canadian keyboard mapping to american mapping.

You can use setxkbmap to change it for the current X session. Since you won't mess any configuration files, the next time you run startx it will use us layout or any other you have chosen.

Code:

setxkbmap -layout us,ca -option group:alt_shift_toggle
This will set two layouts that change with alt+shift, so you can play with your modified canadian and also use the standard us. You can also do it by setting shell aliases for setxkbmap and set single layout.

mpregos 04-29-2011 06:45 PM

Avoiding open new topic ihave a problem with my keyboard layout in a fresh slack 13.37 !=64bit.
I cannot add greek layout , following the instructions from :
http://www.linuxquestions.org/questi...13-0-a-751252/ .

I (believe) do all the necessary actions in order to achieve this.

Does any one have any idea????

my 10-keymap.fdi :
Quote:

bash-4.1$ pwd
/etc/hal/fdi/policy
bash-4.1$ ls -al
total 12
drwxr-xr-x 2 root root 4096 Apr 30 01:12 .
drwxr-xr-x 5 root root 4096 Nov 17 00:55 ..
-rw-r--r-- 1 root root 2184 Apr 30 01:14 10-keymap.fdi
bash-4.1$ pico 10-keymap.fdi
<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->

<!-- DO NOT EDIT THIS FILE - IT WILL BE OVERWRITTEN ON UPGRADES.
SEE THE "READ THIS" NOTE BELOW FOR INSTRUCTIONS -->

<deviceinfo version="0.2">
<device>
<match key="info.capabilities" contains="input.keymap">
<append key="info.callouts.add" type="strlist">hal-setup-keymap</append>
</match>

<match key="info.capabilities" contains="input.keys">

<!-- Restore Ctrl-Alt-Bksp Xserver Zapping -->
<merge key="input.xkb.options" type="string">terminate:ctrl_alt_bksp</merge>

<!-- Edit (as needed) these four lines in the copied fdi file -->
<merge key="input.xkb.rules" type="string">base</merge>
<merge key="input.xkb.model" type="string">evdev</merge>
<merge key="input.xkb.layout" type="string">us,el</merge>
<merge key="input.xkb.options" type="string">grp:alt_shift_toggle,grp_led:scroll,compose:menu</merge>
<merge key="input.xkb.variant" type="string">,extended</merge>

</match>
</device>
</deviceinfo>

<!-- READ THIS FOR CUSTOM KEYBOARD INFORMATION

If you want to add a custom model/layout/variant to X, you will need to COPY
this file to /etc/hal/fdi/policy/ and edit that copy. After editing it to
suit, you will need to leave X, restart the HAL daemon, and start X again.

Here's an example of the four lines from above:
<merge key="input.xkb.rules" type="string">base</merge>
<merge key="input.xkb.model" type="string">evdev</merge>
<merge key="input.xkb.layout" type="string">us</merge>
<merge key="input.xkb.variant" type="string">intl</merge>

Many desktop environments, including KDE and Xfce, have their own methods to
configure keyboard layouts and such if you'd like to use them.

If you prefer to use the "old" way of configuring keyboards (without HAL's
input device hotplugging), then you'll need to add the following lines to
the ServerFlags section of /etc/X11/xorg.conf:
Option "AllowEmptyInput" "false"
Option "AutoAddDevices" "false"
Option "AutoEnableDevices" "false"
You can now edit the Keyboard section of xorg.conf as usual.
-->




Shao Lung 04-29-2011 07:12 PM

Code:

setxkbmap -layout us,ca -option group:alt_shift_toggle
thanks for the code, I guess im back to the drawing board..I worked on my ca_back but I got
Code:

error loading new keyboard description
Ill keep plugging away.

Shao Lung 04-29-2011 07:44 PM

Alright my typing sux,,, i made a few errors in the ca file,,, however i attempted this
Code:

setxkbmap -layout us,ru -option group:alt_shift_toggle
I got no keyboard map switching,, I tried both left alt/shift and right alt/shift, then alternated left alt/ right shift and right alt/ left shift,,, nothing,,,
no russiankeyboard,, after I fixed my typos, it had no problem loading the keyboard file.

imitheos 04-30-2011 04:44 AM

Quote:

Originally Posted by mpregos (Post 4341347)
Avoiding open new topic ihave a problem with my keyboard layout in a fresh slack 13.37 !=64bit.
I cannot add greek layout , following the instructions from :
http://www.linuxquestions.org/questi...13-0-a-751252/ .

I (believe) do all the necessary actions in order to achieve this.

Does any one have any idea????

my 10-keymap.fdi :

Quote:

Originally Posted by CHANGES_AND_HINTS.TXT
The version of Xorg in Slackware 13.37 will not (in most cases) require an
/etc/X11/xorg.conf file. Input hotplugging is no longer done using hal;
instead, it now uses udev for input device detection and keyboard mapping.

Check the file for instructions.

Quote:

Originally Posted by shao Lung (Post 4341387)
Alright my typing sux,,, i made a few errors in the ca file,,, however i attempted this
Code:

setxkbmap -layout us,ru -option group:alt_shift_toggle
I got no keyboard map switching,, I tried both left alt/shift and right alt/shift, then alternated left alt/ right shift and right alt/ left shift,,, nothing,,,
no russiankeyboard,, after I fixed my typos, it had no problem loading the keyboard file.

Yeah my fault. I wrote "group" when i should have written "grp". "grp:alt_shift_toggle" is the correct.

Shao Lung 04-30-2011 11:27 AM

Sweet that did it,,, I did manage to set my keybaord to russian, just cause, and strange all I got was a bunch of question marks...Some of the symbols I use are giving me question marks etc
∂ Я µ √ Ш
Code:

U2202  U42F UB5 U221A U428
I also tried this particular fasion
Code:

partialderivative  Cyrillic_YA mu radical Cyrillic_SHA
the results were the same. I even attempted to copy/paste the symbols in their location and that just made a mess of unreadable garbage, of which the keyboard map could not be loaded.

Any and all solutions are very much appreciated.
Thanks in advance

Shao Lung 04-30-2011 11:39 AM

well i think i got it working properly not sure what i did, other then test in terminal, thank you very much
Ш£|| ! 7#!~x ! 907 !7 Ш0Яx!~9 qЯ0q£Я|j ~07 5µЯ£ Ш#@7 ! ∂!∂, 07#£Я 7#£~ 7£57 !~ 7£ЯM!~@|, 7#@~x j0µ √£Яj Mµ)#
;)

Shao Lung 04-30-2011 12:17 PM

I Ш@~7.... i want to mark this as solved,, however mpregos has made a post, so i am unsure if I should or not,, my end is solved and I thank everyone for the help. If anyone wants a copy of my keyboard map, by all I would gladly post it.


All times are GMT -5. The time now is 09:50 PM.