You are not logged in.

#1 2024-09-28 21:49:06

theluga
Member
Registered: 2023-12-23
Posts: 19

[solved]Terminal Recommendation with Default Keyboard DeadKey behavior

What is the desired "default" behavior?

You need to have a keyboard with accents and diacritics like US-International, Portuguese ABNT2 etc.

On Firefox, Geany, Libre Office etc. If I press the key "~" it will show a "preview diacritic".

If I press a second key that will have a combination like "a" or "n", it will become "ã" or "ñ".

I I press a key that will not combine like "/" or "L" it will become "~/" or "~L". 

This is the default behavior of accents and diacritics.

There is also the old behavior where the key would not show a preview (pressing "^" one time would be invisible until a combination like "ê" or a non combination "^L" and of course, pressing space or the same dead key would appear the proper key "^".

The problem:

I wanted to change my default terminal "gnome-terminal" to another one:

I tried Alacrity, Kitty, Rio, Foot, Extraterm and Contour with the following problem:

If I press a dead key accent or diacritic like ~ it will not show a preview (okay, maybe it's the old behavior, no fuss).
And when I press a combination, it behaves as expected like "ã" however when I press / to go to my Dwnloads folder like ~/Downloads it will delete the "~" and become only "/Downloads".

That is frustrating since going to home directory, need to press "~" two times or "~" and "space" before "/" and this is a waste and of time and quite unusual.

I then tried  Gnome-Console and Wezterm. Both show the preview if I press "~" and makes combinations as expected however if I press "/" like the previous terminals. It will delete the "~" already pressed...

I am likely stuck with gnome-terminal until an alternative with proper diacritic behavior is found besides it.

Do you all have any recommendation or maybe there is some cheat config that will fix in some terminals that I don't know?
I don't want to lose the dead keys if there is a combination, only that it's not deleted when pressing a non combining key.

Thank you, really.

Last edited by theluga (2024-09-29 15:02:37)

Offline

#2 2024-09-29 08:20:32

seth
Member
Registered: 2012-09-03
Posts: 58,556

Re: [solved]Terminal Recommendation with Default Keyboard DeadKey behavior

This isn't so much about the TE but more about the input method.

For anything using xim or ~/.XCompose in any way shape or form, you can just

<dead_tilde> <slash>    : "~/"
<dead_tilde> <KP_Divide>    : "~/"

and "only" need a TE/toolkit/IM that allows to enter strings though XCompose (otherwise you could only insert a single glyph like "~" this way)

GTK/gnome stuff defaults to ibus and on wayland it's anyones guess what's supported or happening anyway.

Offline

#3 2024-09-29 15:01:18

theluga
Member
Registered: 2023-12-23
Posts: 19

Re: [solved]Terminal Recommendation with Default Keyboard DeadKey behavior

Wow, this workaround works!

Do you know how to set this behavior (now with only ~/) as default for all dead keys? I'm using gnome 47 on wayland with xkb. Or will I need to create all possible combinations?

On TTY, the behavior is "correct" with a dead key like ` followed by a number outputs `1 and followed by a vowel à as expected.

I created a non exhaustive file with my most common accents in ~/.XCompose if someone wants an example to build upon.

I will mark as solved, but if there is a way to populate with the full behavior I would like to know

Thank you!

include "%L"



<dead_acute> <b> : "´b"
<dead_acute> <d> : "´d"
<dead_acute> <f> : "´f"
<dead_acute> <h> : "´h"
<dead_acute> <j> : "´j"
<dead_acute> <q> : "´q"
<dead_acute> <t> : "´t"
<dead_acute> <x> : "´x"

<dead_acute> <B> : "´B"
<dead_acute> <D> : "´D"
<dead_acute> <F> : "´F"
<dead_acute> <H> : "´H"
<dead_acute> <J> : "´J"
<dead_acute> <Q> : "´Q"
<dead_acute> <T> : "´T"
<dead_acute> <X> : "´X"

<dead_acute> <1> : "´1"
<dead_acute> <2> : "´2"
<dead_acute> <3> : "´3"
<dead_acute> <4> : "´4"
<dead_acute> <5> : "´5"
<dead_acute> <6> : "´6"
<dead_acute> <7> : "´7"
<dead_acute> <8> : "´8"
<dead_acute> <9> : "´9"
<dead_acute> <0> : "´0"

<dead_acute> <minus> : "´-"
<dead_acute> <equal> : "´="
<dead_acute> <slash> : "´/"
<dead_acute> <bracketleft> : "´["
<dead_acute> <bracketright> : "´]"
<dead_acute> <semicolon> : "´;"
<dead_acute> <apostrophe> : "´'"
<dead_acute> <comma> : "´,"
<dead_acute> <period> : "´."
<dead_acute> <backslash> : "´\\"
<dead_acute> <dead_tilde> : "´~"
<dead_acute> <exclam> : "´!"
<dead_acute> <at> : "´@"
<dead_acute> <numbersign> : "´#"
<dead_acute> <dollar> : "´$"
<dead_acute> <percent> : "´%"
<dead_acute> <dead_circumflex> : "´^"
<dead_acute> <ampersand> : "´&"
<dead_acute> <asterisk> : "´*"
<dead_acute> <parenleft> : "´("
<dead_acute> <parenright> : "´)"
<dead_acute> <underscore> : "´_"
<dead_acute> <plus> : "´+"
<dead_acute> <braceleft> : "´{"
<dead_acute> <braceright> : "´}"
<dead_acute> <colon> : "´:"
<dead_acute> <leftarrow> : "´<"
<dead_acute> <leftarrow> : "´>"
<dead_acute> <question> : "´?"



<dead_grave> <b> : "`b"
<dead_grave> <c> : "`c"
<dead_grave> <d> : "`d"
<dead_grave> <f> : "`f"
<dead_grave> <g> : "`g"
<dead_grave> <h> : "`h"
<dead_grave> <j> : "`j"
<dead_grave> <k> : "`k"
<dead_grave> <l> : "`l"
<dead_grave> <m> : "`m"
<dead_grave> <p> : "`p"
<dead_grave> <q> : "`q"
<dead_grave> <r> : "`r"
<dead_grave> <s> : "`s"
<dead_grave> <t> : "`t"
<dead_grave> <x> : "`x"

<dead_grave> <B> : "`B"
<dead_grave> <C> : "`C"
<dead_grave> <D> : "`D"
<dead_grave> <F> : "`F"
<dead_grave> <G> : "`G"
<dead_grave> <H> : "`H"
<dead_grave> <J> : "`J"
<dead_grave> <K> : "`K"
<dead_grave> <L> : "`L"
<dead_grave> <M> : "`M"
<dead_grave> <P> : "`P"
<dead_grave> <Q> : "`Q"
<dead_grave> <R> : "`R"
<dead_grave> <S> : "`S"
<dead_grave> <T> : "`T"
<dead_grave> <X> : "`X"

<dead_grave> <dead_acute> : "`´"
<dead_grave> <1> : "`1"
<dead_grave> <2> : "`2"
<dead_grave> <3> : "`3"
<dead_grave> <4> : "`4"
<dead_grave> <5> : "`5"
<dead_grave> <6> : "`6"
<dead_grave> <7> : "`7"
<dead_grave> <8> : "`8"
<dead_grave> <9> : "`9"
<dead_grave> <0> : "`0"
<dead_grave> <minus> : "`-"
<dead_grave> <equal> : "`="
<dead_grave> <slash> : "`/"
<dead_grave> <bracketleft> : "`["
<dead_grave> <bracketright> : "`]"
<dead_grave> <semicolon> : "`;"
<dead_grave> <comma> : "`,"
<dead_grave> <period> : "`."
<dead_grave> <backslash> : "`\\"
<dead_grave> <dead_tilde> : "`~"
<dead_grave> <exclam> : "`!"
<dead_grave> <at> : "`@"
<dead_grave> <numbersign> : "`#"
<dead_grave> <dollar> : "`$"
<dead_grave> <percent> : "`%"
<dead_grave> <dead_circumflex> : "`^"
<dead_grave> <ampersand> : "`&"
<dead_grave> <asterisk> : "`*"
<dead_grave> <parenleft> : "`("
<dead_grave> <parenright> : "`)"
<dead_grave> <underscore> : "`_"
<dead_grave> <plus> : "`+"
<dead_grave> <braceleft> : "`{"
<dead_grave> <braceright> : "`}"
<dead_grave> <colon> : "`:"
<dead_grave> <question> : "`?"



<dead_tilde> <b> : "~b"
<dead_tilde> <c> : "~c"
<dead_tilde> <d> : "~d"
<dead_tilde> <f> : "~f"
<dead_tilde> <g> : "~g"
<dead_tilde> <h> : "~h"
<dead_tilde> <j> : "~j"
<dead_tilde> <k> : "~k"
<dead_tilde> <l> : "~l"
<dead_tilde> <m> : "~m"
<dead_tilde> <p> : "~p"
<dead_tilde> <q> : "~q"
<dead_tilde> <r> : "~r"
<dead_tilde> <s> : "~s"
<dead_tilde> <t> : "~t"
<dead_tilde> <w> : "~w"
<dead_tilde> <x> : "~x"
<dead_tilde> <z> : "~z"

<dead_tilde> <B> : "~B"
<dead_tilde> <C> : "~C"
<dead_tilde> <D> : "~D"
<dead_tilde> <F> : "~F"
<dead_tilde> <G> : "~G"
<dead_tilde> <H> : "~H"
<dead_tilde> <J> : "~J"
<dead_tilde> <K> : "~K"
<dead_tilde> <L> : "~L"
<dead_tilde> <M> : "~M"
<dead_tilde> <P> : "~P"
<dead_tilde> <Q> : "~Q"
<dead_tilde> <R> : "~R"
<dead_tilde> <S> : "~S"
<dead_tilde> <T> : "~T"
<dead_tilde> <W> : "~W"
<dead_tilde> <X> : "~X"
<dead_tilde> <Z> : "~Z"

<dead_tilde> <dead_acute> : "~´"
<dead_tilde> <1> : "~1"
<dead_tilde> <2> : "~2"
<dead_tilde> <3> : "~3"
<dead_tilde> <4> : "~4"
<dead_tilde> <5> : "~5"
<dead_tilde> <6> : "~6"
<dead_tilde> <7> : "~7"
<dead_tilde> <8> : "~8"
<dead_tilde> <9> : "~9"
<dead_tilde> <0> : "~0"
<dead_tilde> <minus> : "~-"
<dead_tilde> <equal> : "~="
<dead_tilde> <slash> : "~/"
<dead_tilde> <bracketleft> : "~["
<dead_tilde> <bracketright> : "~]"
<dead_tilde> <semicolon> : "~;"
<dead_tilde> <comma> : "~,"
<dead_tilde> <period> : "~."
<dead_tilde> <backslash> : "~\\"
<dead_tilde> <exclam> : "~!"
<dead_tilde> <at> : "~@"
<dead_tilde> <numbersign> : "~#"
<dead_tilde> <dollar> : "~$"
<dead_tilde> <percent> : "~%"
<dead_tilde> <dead_circumflex> : "~^"
<dead_tilde> <ampersand> : "~&"
<dead_tilde> <asterisk> : "~*"
<dead_tilde> <parenleft> : "~("
<dead_tilde> <parenright> : "~)"
<dead_tilde> <underscore> : "~_"
<dead_tilde> <plus> : "~+"
<dead_tilde> <braceleft> : "~{"
<dead_tilde> <braceright> : "~}"
<dead_tilde> <colon> : "~:"
<dead_tilde> <leftarrow> : "~<"
<dead_tilde> <leftarrow> : ">"
<dead_tilde> <question> : "~?"



<dead_circumflex> <b> : "^b"
<dead_circumflex> <d> : "^d"
<dead_circumflex> <f> : "^f"
<dead_circumflex> <k> : "^k"
<dead_circumflex> <l> : "^l"
<dead_circumflex> <m> : "^m"
<dead_circumflex> <n> : "^n"
<dead_circumflex> <p> : "^p"
<dead_circumflex> <q> : "^q"
<dead_circumflex> <r> : "^r"
<dead_circumflex> <t> : "^t"
<dead_circumflex> <v> : "^v"
<dead_circumflex> <x> : "^x"

<dead_circumflex> <B> : "^B"
<dead_circumflex> <D> : "^D"
<dead_circumflex> <F> : "^F"
<dead_circumflex> <K> : "^K"
<dead_circumflex> <L> : "^L"
<dead_circumflex> <M> : "^M"
<dead_circumflex> <N> : "^N"
<dead_circumflex> <P> : "^P"
<dead_circumflex> <Q> : "^Q"
<dead_circumflex> <R> : "^R"
<dead_circumflex> <T> : "^T"
<dead_circumflex> <V> : "^V"
<dead_circumflex> <X> : "^X"

#<dead_circumflex> <1> : "^1"
#<dead_circumflex> <2> : "^2"
#<dead_circumflex> <3> : "^3"
#<dead_circumflex> <4> : "^4"
#<dead_circumflex> <5> : "^5"
#<dead_circumflex> <6> : "^6"
#<dead_circumflex> <7> : "^7"
#<dead_circumflex> <8> : "^8"
#<dead_circumflex> <9> : "^9"
#<dead_circumflex> <0> : "^0"

<dead_circumflex> <minus> : "^-"
<dead_circumflex> <equal> : "^="
<dead_circumflex> <slash> : "^/"
<dead_circumflex> <bracketleft> : "^["
<dead_circumflex> <bracketright> : "^]"
<dead_circumflex> <semicolon> : "^;"
<dead_circumflex> <apostrophe> : "^'"
<dead_circumflex> <comma> : "^,"
<dead_circumflex> <period> : "^."
<dead_circumflex> <backslash> : "^\\"
<dead_circumflex> <dead_tilde> : "^~"
<dead_circumflex> <exclam> : "^!"
<dead_circumflex> <at> : "^@"
<dead_circumflex> <numbersign> : "^#"
<dead_circumflex> <dollar> : "^$"
<dead_circumflex> <percent> : "^%"
<dead_circumflex> <ampersand> : "^&"
<dead_circumflex> <asterisk> : "^*"
<dead_circumflex> <parenleft> : "^("
<dead_circumflex> <parenright> : "^)"
<dead_circumflex> <underscore> : "^_"
<dead_circumflex> <plus> : "^+"
<dead_circumflex> <braceleft> : "^{"
<dead_circumflex> <braceright> : "^}"
<dead_circumflex> <colon> : "^:"
<dead_circumflex> <question> : "^?"

Last edited by theluga (2024-09-29 15:18:49)

Offline

#4 2024-09-29 18:13:48

seth
Member
Registered: 2012-09-03
Posts: 58,556

Re: [solved]Terminal Recommendation with Default Keyboard DeadKey behavior

<dead_acute> <b> : "´b"

Do you type those combinations a lot?
grave ` and acute ´ are not quotemarks and I only ever hit them when I want to týpè èn fákè-dè-frànçàis - while a lañguage that puts the tilde over letters is obviously way more collision-friendly.

But your edit is the only way to get there (unless the IM had a hack to handle dead keys differently), the "normal" approach is to use the dead key twice to get it literally.

Offline

#5 2024-09-29 18:37:57

theluga
Member
Registered: 2023-12-23
Posts: 19

Re: [solved]Terminal Recommendation with Default Keyboard DeadKey behavior

My keyboard is PT-BR ABNT2.

My keyboard has acute, grave and quote separately. The reason to use the grave is to make scripting with bash since grave is aka backtick.

Now the acute. I just wanted to be comprehensive because it's the same key of the grave accent (without shift) without any real world use, and in the same way with the circumflex ^ (same key of tilde ~).

It's just that if I forget the shift or press it wrongly, I want to see the key of my mistype.

And also, since I almost never use diaresis I also ignored this to populate my .XCompose (my keyboard also has different keys for diaresis ¨ and double quotes " as opposed to the US-Intl)

It's more for making the completion of the key itself instead of any particular meaning.

Those are the dead keys for my language (Portuguese) acute, grave, circumflex, tilde and diaresis.

There is also cedilla ¸ but since it's only used on ç we have a key only for this combination on the keyboard itself without needing a dead key for cedilla.

Thank you for your interest!

Offline

#6 2024-09-29 19:06:00

seth
Member
Registered: 2012-09-03
Posts: 58,556

Re: [solved]Terminal Recommendation with Default Keyboard DeadKey behavior

Completely off-topic, but

The reason to use the grave is to make scripting with bash since grave is aka backtick.

don't: https://www.reddit.com/r/bash/comments/ … t/igwiowd/

Offline

#7 2024-09-29 19:24:42

theluga
Member
Registered: 2023-12-23
Posts: 19

Re: [solved]Terminal Recommendation with Default Keyboard DeadKey behavior

Yes, you are right.

I don't create new bash scripts with grave accent but if I find a script or command already made and I want to edit it to suit my needs, I try to maintain the same syntax and that includes keeping the backticks.

Offline

#8 2024-09-29 19:38:32

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [solved]Terminal Recommendation with Default Keyboard DeadKey behavior

Those characters are also used in some language - quite regularly in (La)TeX for quotes.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB