Skip to content

Instantly share code, notes, and snippets.

@barata0
Last active June 26, 2024 18:33
Show Gist options
  • Save barata0/82eb0c70620d4f17047c268529ca654b to your computer and use it in GitHub Desktop.
Save barata0/82eb0c70620d4f17047c268529ca654b to your computer and use it in GitHub Desktop.
xkb symbols para teclado de laptop ABNT2 ficar parecido com US INTERNATIONAL
// file:/usr/share/X11/xkb/symbols/mycustomlayout
default partial alphanumeric_keys
xkb_symbols "mycustomlayout" {
// Based on a very simple Brazilian modified ABNT2 keyboard,
// by Daniel Ribeiro (danieltribeiro@gmail.com).
// With added support for dead keys in I18N applications,
// by Conectiva (http://www.conectiva.com.br).
// the idea is to have almost the us-international with cedil
include "br(abnt2)"
name[Group1]="Portuguese (Brazil - dtr)";
key <TLDE> { [ grave, dead_tilde, notsign, notsign ] };
key <AE06> { [ 6,dead_circumflex, notsign, diaeresis ] };
key <AD11> { [ bracketleft, braceleft, ordfeminine, dead_macron ] };
key <AD12> { [ bracketright, braceright, masculine, masculine ] };
key <AC11> { [ semicolon, colon, dead_belowdot, dead_abovedot ] };
key <BKSL> { [ apostrophe, quotedbl, dead_acute, dead_grave ] };
key <AC10> { [ ccedilla, Ccedilla, dead_acute,dead_doubleacute ] };
key <LSGT> { [ backslash, bar, dead_caron, dead_breve ] };
// The ABNT-2 keyboard has this special key:
key <AB10> { [ slash, question, degree, questiondown ] };
key <PRSC> { [ Prior, Prior, Prior, Prior ] };
key <PAUS> { [ Next, Next, Next, Next ] };
key <UP> { [ Up, Up, Prior, Prior ] };
key <LEFT> { [ Left, Left, Home, Home ] };
key <DOWN> { [ Down, Down, Next, Next ] };
key <RGHT> { [ Right, Right, End, End ] };
include "kpdl(dot)"
include "level3(ralt_switch)"
};
@barata0
Copy link
Author

barata0 commented Mar 3, 2021

You need to add this to /usr/share/X11/xkb/rules/evdev.extras.xml inside layoutList tag

    <layout>
      <configItem popularity="exotic">
        <name>mycustomlayout</name>
        <shortDescription>mycustomlayout</shortDescription>
        <description>Portuguese (My Custom Layout)</description>
      </configItem>
    </layout>

@barata0
Copy link
Author

barata0 commented Jun 26, 2024

Refresh ubuntu keyboard
$> gsettings set org.gnome.desktop.input-sources show-all-sources true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment