FedoraForum.org - Fedora Support Forums and Community
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2010
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question [SOLVED]Incorrect keyboard layout (no pipe character)

    Hi all, I'm new to linux, been using fedora 12 for about a week. I just noticed a problem with my keyboard layout.

    When i press the key with the backslash and pipe character, i get < for backslash and > for the pipe character.

    I have tried the following to fix the problem:

    1.
    $ gnome-keyboard-properties
    then selected the proper keyboard model (Asus Laptop)
    tried adding different keyboard layouts and setting them as default
    nothing i did there made any difference.
    I am currently using USA, i have tried Canada English, USA international, and more
    I noticed that even when i change it to something like Afganistan, there is no noticable different when i type in the test area.
    I notice that there are keyboard layouts that have < and > where the backslash and pipe character should be, but the picture for USA shows the pipe and backslash where they should be.


    2.
    $ system-config-keyboard
    When i use this to change my keyboard layout, the change works.
    When i choose USA or USA International the propblem persists.
    However, when I change it to United Kingdom, the pipe character and backslash start to work, but of course it also changes some other symbols that I would rather have working properly

    3.
    https://bugzilla.redhat.com/show_bug.cgi?id=476358
    Added Option "AutoAddDevices" "off" to xorg.conf:
    Code:
    Section "ServerLayout"
    	Identifier     "Default Layout"
    	Screen      0  "Screen0" 0 0
    	InputDevice    "Keyboard0" "CoreKeyboard"
    	InputDevice    "Mouse0" "CorePointer"
    	Option	    "Xinerama" "0"
    	Option "AutoAddDevices" "off"
    EndSection

    The one thing I didnt try is to use XKB, but I am unable to find a guide explaining how to do so. Is there a file that I could edit to change the keycode for the backslash key or something?
    I thank you in advance for your help.


    ~FireXware
    Last edited by FireXware; 12th February 2010 at 02:09 AM. Reason: solved

  2. #2
    Join Date
    Jul 2008
    Location
    London
    Posts
    459
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The command setxkbmap -print will list the various files used to build the keyboard driver, so the output should include a line like

    xkb_symbols { include "pc+us ...

    The second item refers to /usr/share/X11/xkb/symbols/us which is the US keyboard definition. It should include the lines

    key <AB08> { [ comma, less ] };
    key <AB09> { [ period, greater ] };
    key <BKSL> { [ backslash, bar ] };

    If it doesn't, you can correct it. If it does, then the problem is probably in the hardware. Look at the file /usr/share/X11/xkb/keycodes/evdev and find the scan code associated with <BKSL>. Then use the program xev to find the scan code being returned by your keyboard; if it's different, change the file.

  3. #3
    Join Date
    Feb 2010
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you. xev tells me the keycode for the backslash key is 94, while xkb/keycode/evdev had 51. I changed it to 94 and restarted, still no luck. I also tried changing it to the value of the tilde key and commenting out the <TLDE> entry and the tilde key did not give a backslash (i didnt restart when i tried this i only did setxkbmap us), which leads me to believe i'm editing the wrong file even though all the other entries match up with what xev gives me.


    Output of setxkbmap -print
    Code:
    xkb_keymap {
    	xkb_keycodes  { include "xfree86+aliases(qwerty)"	};
    	xkb_types     { include "complete"	};
    	xkb_compat    { include "complete"	};
    	xkb_symbols   { include "pc+us+inet(media_common)+group(shift_caps_toggle)"	};
    	xkb_geometry  { include "pc(pc104)"	};
    };
    from xev
    Code:
    KeyRelease event, serial 35, synthetic NO, window 0x5000001,
        root 0x142, subw 0x0, time 2392962, (168,-11), root:(174,41),
        state 0x0, keycode 94 (keysym 0x3c, less), same_screen YES,
        XLookupString gives 1 bytes: (3c) "<"
        XFilterEvent returns: False
    Attached are the us and evdev files.
    Attached Files Attached Files

  4. #4
    Join Date
    Feb 2010
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Fixed

    Ok i got it fixed.

    What I did was look in the united kingdom mapping for which the | and | (i can type them now!!!) worked and it had
    Code:
    key <LSGT>	{ [ backslash,        bar, backslash, bar]	};
    which corresponds to the line of evdev which was already there
    Code:
            # Added for pc105 compatibility
            <LSGT> = 94;
    I added the line from the united kingdom mapping to the us mapping and then setting it to US allowed me to type | and \ but holding down a key wouldn't make it repeat. That was easily fixed by using the system > preferences > keyboard to disable then enable it.

    Thank you DavidMcCann.

Similar Threads

  1. Keyboard layout / keyboard selector
    By simpson0107 in forum Using Fedora
    Replies: 0
    Last Post: 26th February 2009, 04:43 PM
  2. Keyboard Layout Options per Keyboard
    By sgarrity in forum Hardware
    Replies: 0
    Last Post: 21st August 2008, 02:53 PM
  3. Keyboard Mappings appear to be incorrect
    By casket88 in forum Using Fedora
    Replies: 2
    Last Post: 15th October 2007, 02:31 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •