Skip to content

Instantly share code, notes, and snippets.

@danilogco
Created September 3, 2025 04:11
Show Gist options
  • Save danilogco/c2eefc066d63fe7d6f49ce18a9c40037 to your computer and use it in GitHub Desktop.
Save danilogco/c2eefc066d63fe7d6f49ce18a9c40037 to your computer and use it in GitHub Desktop.

Revisions

  1. danilogco created this gist Sep 3, 2025.
    30 changes: 30 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,30 @@
    sudo cp /usr/share/X11/xkb/symbols/us /usr/share/X11/xkb/symbols/us_shiftaccents
    sudo nano /usr/share/X11/xkb/symbols/us_shiftaccents

    # No arquivo, adicione uma nova variante que herde do us(intl):
    partial alphanumeric_keys
    xkb_symbols "shift_accents" {
    include "us(intl)"

    // Acentos com Shift
    key <AC01> { [ a, A, aacute, Aacute ] }; // A
    key <AC02> { [ s, S, s, S ] }; // S
    key <AC03> { [ d, D, d, D ] }; // D
    key <AD03> { [ e, E, eacute, Eacute ] }; // E
    key <AC07> { [ o, O, otilde, Otilde ] }; // O
    key <AC08> { [ u, U, uacute, Uacute ] }; // U
    key <AC08> { [ k, K, k, K ] }; // K sem acento
    key <AC07> { [ c, C, ccedilla, Ccedilla ] }; // C


    // Outros acentos podem ser adicionados da mesma forma
    };

    # Editar
    /etc/default/keyboard

    XKBLAYOUT="us_shiftaccents"
    XKBVARIANT="shift_accents"
    XKBOPTIONS=""

    setxkbmap -option lv3:ralt_switch