3

I have Logitech Mx Keys keyboard, and use Portuguese Brazil language.

The keyboard layout is american and not works well.

If I run set setxkbmap -model abnt -layout us -variant intl the double quotes not works well, they go out like this ¨¨.

If I run the command like this setxkbmap -layout us the double quotes works but if I need to accent words, not works, the accent go out without the letter like this. s~ao

I dont know what to do.

6
  • 1
    Try to press <Shift> + ' followed by space. May 14, 2021 at 19:10
  • @GunnarHjalmarsson it worked but if someone knows what to do to be more simple. May 14, 2021 at 19:15
  • I was surprised to see that pressing <Shift> + ' twice didn't work as expected. Let's see if somebody else chimes in. May 14, 2021 at 19:31
  • 1
    I took the GUI route and went to settings > Region & Language > Add an Input Source. There I searched for English (US, note, no ). I found four US English variants: 1) English (US), 2) English (US, alt. intl.), 3) English (US. euro on 5), 4) English (US, intl., with dead keys). Of these items 2 and 4 may be of interest to you.
    – user68186
    May 18, 2021 at 16:01
  • @user68186 my single or double quote are strage, they print ¨¨ May 18, 2021 at 17:15

1 Answer 1

2
+50

Check configuration

man setxkbmap shows that

   -query  With this option setxkbmap just prints the current rules, model, layout, variant, and options, then exits.

so you can check the configuration (and it would help if you post the output) with

setxkbmap -query -v 10

Set configuration

You might need -variant intl or -variant altgr-intl. But again, as per man page

   -variant name
           Specifies which variant of the keyboard layout should be used to determine the components which make up the  keyboard
           description.  The -variant option may only be used once. Multiple variants can be specified as a comma-separated list
           and will be matched with the layouts specified with -layout.

So for instance in my case to change the variant of the third layout from intl to altgr-intl I have to use a comma separated list

$ setxkbmap -query
rules:      evdev
model:      pc105
layout:     latam,il,us,us
variant:    ,,intl,
$ setxkbmap -variant ,,altgr-intl,

In addition, you may need to use -model pc105. I am not sure -model abnt is even a valid model (where did yo get that from? I could only find a few, not necessarily reputable sources, using it). A hint to this assertion is given by

$ find /usr/share/X11/xkb/ -type f -exec grep -nH --color abnt {} \;
/usr/share/X11/xkb/geometry/pc:831:xkb_geometry "abnt2" {
/usr/share/X11/xkb/geometry/pc:886:}; // End of "abnt2" geometry
/usr/share/X11/xkb/symbols/sun_vndr/br:84:  xkb_symbols "abnt2" {
/usr/share/X11/xkb/symbols/sun_vndr/br:85:  include "br(abnt2)"
/usr/share/X11/xkb/symbols/br:2:xkb_symbols "abnt2" {
/usr/share/X11/xkb/symbols/br:49:    include "br(abnt2)"
/usr/share/X11/xkb/symbols/br:66:    include "br(abnt2)"

You may combine using Settings -> Region & Language -> Input Sources and choosing / adding an option (e.g., English (US, intl., with dead keys)), and then setxkbmap -query to see what may be the proper model and perhaps also rules.

Notes

  1. Out of curiosity, I checked what character you were getting

     $ printf ¨ | recode ..dump
     UCS2   Mne   Description
    
     00A8   ':    diaeresis
    
  2. You can check available options with (also 1, 2)

     man xkeyboard-config
    

    or to cat instead of paging

     man -P cat xkeyboard-config
    
  3. Old linuxes allowed for using ~/.xinitrc for permanent configuration (e.g. 3), I am not sure it still works.

  4. I have just asked abnt not listed in xkeyboard-config models

Related

  1. Keyboard is not configured for pt-BR
  2. https://forum.mxlinux.org/viewtopic.php?t=45398&start=10
  3. https://unix.stackexchange.com/questions/519711/portuguese-language-us-keyboard
  4. How to write in Brazilian Portuguese using a US keyboard?
  5. One keyboard two languages on Ubuntu 17.10
  6. https://ubuntu-mate.community/t/problems-typing-portuguese-characters/10827
  7. Use US(International with dead keys) in i3wm
  8. https://superuser.com/questions/1029357/how-to-use-altgr-intl-in-kde
  9. https://manpages.ubuntu.com/manpages/bionic/en/man5/keyboard.5.html
  10. What file is the setxkbmap option -rules meant to take, and how can I add keyboard variants to that file?
  11. https://wiki.archlinux.org/title/Xorg/Keyboard_configuration#Using_X_configuration_files

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .