Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
I am encountering a very weird error recently, that I cannot figure out to solve... I have surfed for hours and hours without any solution. I explain: I have an ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2014
    Posts
    6

    Angry Wrong keyboard behavior


    I am encountering a very weird error recently, that I cannot figure out to solve...

    I have surfed for hours and hours without any solution.

    I explain: I have an Asus S301L , with Ubuntu 12.04 and an Italian keyboard;
    Every time I log in, some key on my keyboard does not work properly:

    • p priduces *
      0 produces /
      - produces +



    But also others...for example, It took time for me to write just this message...so frustrating sometimes.

    The only way to have things again to work properly is to type in a shell:

    Code:
    setxkbmap it
    And it starts again to work, just for a (indefinite) duration of time , then, things, again, are wrong.

    I hope to be clear and have explained my problem.
    Anyone can help me ?

    Thanks in advance for all the answers you'll give me
    Cheers

  2. #2
    Linux Engineer
    Join Date
    Dec 2013
    Posts
    1,063
    Have yo checked /etc/default/keyboard?

  3. #3
    Just Joined!
    Join Date
    Apr 2014
    Posts
    6
    Quote Originally Posted by gregm View Post
    Have yo checked /etc/default/keyboard?
    Thanks for the answer, this is the content of it

    Code:
    # Check /usr/share/doc/keyboard-configuration/README.Debian for
    # documentation on what to do after having modified this file.
    
    # The following variables describe your keyboard and can have the same
    # values as the XkbModel, XkbLayout, XkbVariant and XkbOptions options
    # in /etc/X11/xorg.conf.
    
    XKBMODEL="asus_laptop"
    XKBLAYOUT="it"
    XKBVARIANT=""
    XKBOPTIONS="terminate:ctrl_alt_bksp"
    
    # If you don't want to use the XKB layout on the console, you can
    # specify an alternative keymap.  Make sure it will be accessible
    # before /usr is mounted.
    # KMAP=/etc/console-setup/defkeymap.kmap.gz

  4. #4
    Linux Engineer
    Join Date
    Dec 2013
    Posts
    1,063
    I guess those settings don't do much.

    It seems there should be a setting that does but you could add "setxkbmap it" to your /etc/profile and it will set the keyboard on a boot.

  5. #5
    Just Joined!
    Join Date
    Apr 2014
    Posts
    6
    thanks, that could a solution...

    but the problem is also that, after I restored the layout, I don't really know why, it is broken again...

    Is there a way to do a complete reset of xkb, or xmodmap ?

    coul be a solution?

  6. #6
    Linux Engineer
    Join Date
    Dec 2013
    Posts
    1,063
    setxkbmap is the way to do it. To find your defaults you can parse through /etc/X11/xorg.conf. On mine I ran
    Code:
    grep -a5 InputDevice /etc/X11/xorg.conf
    but it didn't come up with much of interest.
    Code:
    Section "InputDevice"
        # generated from default
        Identifier     "Keyboard0"
        Driver         "kbd"
    EndSection
    Nothing applicable but if you look at this you can see how to use what you find: The XKB Configuration Guide

  7. #7
    Just Joined!
    Join Date
    Apr 2014
    Posts
    6
    Quote Originally Posted by gregm View Post
    setxkbmap is the way to do it. To find your defaults you can parse through /etc/X11/xorg.conf. On mine I ran
    Code:
    grep -a5 InputDevice /etc/X11/xorg.conf
    but it didn't come up with much of interest.
    Code:
    Section "InputDevice"
        # generated from default
        Identifier     "Keyboard0"
        Driver         "kbd"
    EndSection
    From my

    Code:
    /usr/share/X11/xorg.conf.d/10-keyboard.conf
    file, I have :

    Code:
    Section "InputClass"
            Identifier "system-keyboard"
            MatchIsKeyboard "on"
            Option "XkbLayout" "it"
            Option "XkbModel" "asus_laptop"
            Option "XkbOptions" "terminate:ctrl_alt_bksp"
    EndSection

  8. #8
    Linux Engineer
    Join Date
    Dec 2013
    Posts
    1,063
    So your command is:
    Code:
    setxkbmap -option "terminate:ctrl_alt_bksp" -layout "it" -model "asus_laptop"

  9. #9
    Just Joined!
    Join Date
    Apr 2014
    Posts
    6
    Quote Originally Posted by gregm View Post
    So your command is:
    Code:
    setxkbmap -option "terminate:ctrl_alt_bksp" -layout "it" -model "asus_laptop"
    Ok, thanks.

    But my main problem is also that, after a while I did the reset ( and the all keys properly work ) , the layout is "broken" again....

  10. #10
    Linux Engineer
    Join Date
    Dec 2013
    Posts
    1,063
    Did you look through your xorg logs?

Page 1 of 2 1 2 LastLast

Posting Permissions

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