You are not logged in.

#1 2024-11-25 19:26:59

wkewinw
Member
Registered: 2024-06-18
Posts: 9

How do I change the "AltGr" (Level 3 Shift) into acting as Ctrl + Alt?

Hey could someone help me change the AltGr key behavior to instead of activating Level 3 Shift, i want it to act as Ctrl + Alt.
As it is right now i cant keybind AltGr to act as Ctrl + Alt in FFXIV like i did when i was on windows 11.
My keyboard is ISO layout TKL.

If it is possible any help would be appreciated

Offline

#2 2024-11-26 09:08:06

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

Re: How do I change the "AltGr" (Level 3 Shift) into acting as Ctrl + Alt?

In what environment?
X11? Wayland? What wayland compositor etc et pp.

You can map the key  to any modifier (alt OR ctrl), but for a sequence you'll have to bind it to some action that triggers boths keys.
https://wiki.archlinux.org/title/Input_remap_utilities

Also, are you sure you want to sacrifice the 3rd level shift? For most non-US layouts that's a rather relevant feature.

Online

#3 2024-11-26 09:10:22

jl2
Member
From: 47° 18' N 8° 34' E
Registered: 2022-06-01
Posts: 462
Website

Re: How do I change the "AltGr" (Level 3 Shift) into acting as Ctrl + Alt?

This should be doable with xkb: https://man.archlinux.org/man/xkeyboard-config.7
All options can be seen here, I haven't found anything in that direction but if it is available in MS windows it should be possible.

You might need to make a custom rule, I can help you with that.

Last edited by jl2 (2024-11-26 09:11:21)


Why I run Arch? To "BTW I run Arch" the guy one grade younger.
And to let my siblings and cousins laugh at Arsch Linux...

Offline

#4 2024-11-26 16:30:26

wkewinw
Member
Registered: 2024-06-18
Posts: 9

Re: How do I change the "AltGr" (Level 3 Shift) into acting as Ctrl + Alt?

seth wrote:

In what environment?
X11? Wayland? What wayland compositor etc et pp.

You can map the key  to any modifier (alt OR ctrl), but for a sequence you'll have to bind it to some action that triggers boths keys.
https://wiki.archlinux.org/title/Input_remap_utilities

Also, are you sure you want to sacrifice the 3rd level shift? For most non-US layouts that's a rather relevant feature.

I'm using Wayland,KDE Plasma.

ah i see now that u mention it maybe its better to get used to it and not think about it, i just now realized what symbols on the keyboard i wouldn't be able to type if i change it xD
i guess linux and windows just do key modifier combo stuff a bit different from each other.
possibly there's also some AltGr button combo that does something for something in linux, an app or something terminal related or idk, something that i just dont know about yet or haven't had to do yet other than to be able to type certain symbols.

Offline

#5 2024-11-26 19:02:32

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

Re: How do I change the "AltGr" (Level 3 Shift) into acting as Ctrl + Alt?

No, the 3rd level shift is exclusively to allow you to reach, well, 3rd level symbols.

Maybe elaborate on what you're trying to do here and how that relates to (I guess) final fantasy.
How does the keyboard behave on windows?

i guess linux and windows just do key modifier combo stuff a bit different from each other.

Maybe, but that doesn't change the fundamental problem.
Mapping a prominent alternative: the super/windows key is often desired to have a dual function
1. act as super-modifier when pressed together w/ a different key
2. trigger some menu when pressed and released by itself.

That distinction is possible and some shortcut daemons do this (though not sure whether anyone does this for altgr) but in that case it makes little sense to map altgr press/release to ctrl+alt map/release, because you're just pressing two modifers (which are typically meant to go along a 3rd key)

Online

#6 2024-11-27 09:13:16

jl2
Member
From: 47° 18' N 8° 34' E
Registered: 2022-06-01
Posts: 462
Website

Re: How do I change the "AltGr" (Level 3 Shift) into acting as Ctrl + Alt?

I'm using Wayland,KDE Plasma.

I don't think a whole daemon is necessary as seth said, can't you just add a keybind in plasma's settings for the ones you need?
IIRC plasma can do multiple keybinds for the same action, so you could have "ctrl+alt+tab" and "altgr+tab" simultaniously.


Why I run Arch? To "BTW I run Arch" the guy one grade younger.
And to let my siblings and cousins laugh at Arsch Linux...

Offline

#7 2024-11-27 14:43:57

wkewinw
Member
Registered: 2024-06-18
Posts: 9

Re: How do I change the "AltGr" (Level 3 Shift) into acting as Ctrl + Alt?

seth wrote:

No, the 3rd level shift is exclusively to allow you to reach, well, 3rd level symbols.

Maybe elaborate on what you're trying to do here and how that relates to (I guess) final fantasy.
How does the keyboard behave on windows?

i guess linux and windows just do key modifier combo stuff a bit different from each other.

Maybe, but that doesn't change the fundamental problem.
Mapping a prominent alternative: the super/windows key is often desired to have a dual function
1. act as super-modifier when pressed together w/ a different key
2. trigger some menu when pressed and released by itself.

That distinction is possible and some shortcut daemons do this (though not sure whether anyone does this for altgr) but in that case it makes little sense to map altgr press/release to ctrl+alt map/release, because you're just pressing two modifers (which are typically meant to go along a 3rd key)

so for Final Fantasy XIV, in the xivlauncher there is a toggle Called: "Hack: XMODIFIERS="@im=null" (fixes some mouse-related issues, some stuttering issues)
with this disabled, the game thinks my keyboard is ANSI i believe. but able to make acute accented characters, well some of them iirc depending on the layout differences where a key is
but with it enabled i get the correct layout, but unable to make acute accented characters.

so the problem or problems is only that it is only while playing FFXIV that i have to let go of my mouse to press LeftCtrl + LeftAlt + O to open the FreeCompany window (the guild window) where on windows i could just just one hand and press the AltGr button + O, and still be able to move around controlling my character with my mouse.
but i guess i could just change from wanting to use AltGr to instead using RightShift or RightCtrl for the furher half of the keys on the keyboard.
i only kinda wanter AltGr to act as RightCtrl+RightAlt for FFXIV, outside of the game how it works default in linux is fine. but i can get used to using RightShift or RightCtrl tbh.

then that would leave me with the issue of not being able to make acute accented characters. i only really want to make accented characters for smileys tho, but it might just be a wine issue for some reason?

Offline

#8 2024-11-27 14:45:30

wkewinw
Member
Registered: 2024-06-18
Posts: 9

Re: How do I change the "AltGr" (Level 3 Shift) into acting as Ctrl + Alt?

jl2 wrote:

I'm using Wayland,KDE Plasma.

I don't think a whole daemon is necessary as seth said, can't you just add a keybind in plasma's settings for the ones you need?
IIRC plasma can do multiple keybinds for the same action, so you could have "ctrl+alt+tab" and "altgr+tab" simultaniously.

hmm im not sure ive found that, it would have to be specific to only make the change affective in FFXIV and not outside of the game.
i can live with getting used to using RightShift and or RightCtrl

Offline

#9 2024-11-27 15:15:48

wkewinw
Member
Registered: 2024-06-18
Posts: 9

Re: How do I change the "AltGr" (Level 3 Shift) into acting as Ctrl + Alt?

The game doesnt seem to be able to differentiate Left and Right for any of the Ctrl, Alt, Shift buttons

Offline

#10 2024-11-27 18:04:15

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

Re: How do I change the "AltGr" (Level 3 Shift) into acting as Ctrl + Alt?

game thinks my keyboard is ANSI i believe

https://wiki.archlinux.org/title/Input_method

i have to let go of my mouse to press LeftCtrl + LeftAlt + O to open the FreeCompany window

I don't think this has anything to do w/ XMODIFIERS="@im=null" but can't you bind the action to whatever is on altgr+o (eg. "ø")?

Online

#11 2024-11-27 21:42:49

wkewinw
Member
Registered: 2024-06-18
Posts: 9

Re: How do I change the "AltGr" (Level 3 Shift) into acting as Ctrl + Alt?

seth wrote:

game thinks my keyboard is ANSI i believe

https://wiki.archlinux.org/title/Input_method

i have to let go of my mouse to press LeftCtrl + LeftAlt + O to open the FreeCompany window

I don't think this has anything to do w/ XMODIFIERS="@im=null" but can't you bind the action to whatever is on altgr+o (eg. "ø")?

So i did test again with @im=null disabled and realize where i've been wrong and why i stuck to using im=null xD

so the toggle is for mouse issues. mouse issues i didnt have, but i enabled it anyways, because thinking as a preventative meassure for possible mouse stuttering issues if any at some point might occur.

i also now remember that i liked that with im=null enabled it for some reason in the game that it required less two less button presses to make " ^^ "since i do those eyes 99% more often than i make " è_é " i didnt realize that it had something to do with that. so something with the im=null toggle makes it so or removes the ability to make accented characters. it breaks the ability of what ever the technical name for it is for when you press one of those acute accent characters it just prints out the accent.

i remember the first few weeks i played FFXIV on linux i was able to make accented characters. but somehow i didnt make the connection with the toggle, or like that i thought it was more worth it to be able to write ^^ with just two presses instead of four and as time passed i forgot why i made the decision hehe

and i was wrong about im=null changing to ANSI. i think i mixed up what it did cus i also used the terminal command setxkbmap. i think i mixed up what did what and the outcome of what the toggle was set to.

as for AltGr it is not registered as anything when trying to bind it to something. when trying to bind it it doesnt even register as Alt, and not as RightAlt either. all i can use it for is to access the Level3.

i now have XMODIFIERS="@im=null" disabled
as for trying to change AltGr to Ctrl+Alt, i think ill not try and mess with it. maybe it could be done with some launch command in the launcher hmm

Offline

#12 2024-11-28 06:55:09

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

Re: How do I change the "AltGr" (Level 3 Shift) into acting as Ctrl + Alt?

i also now remember that i liked that with im=null enabled it for some reason in the game that it required less two less button presses to make " ^^ "since i do those eyes 99% more often than i make " è_é "

It disables deadkey handling, depending on your layout there may be multiple variants anyway - eg. de/deadgraveacute allows é and à but leaves the circumflex ^ alone.

as for AltGr it is not registered as anything when trying to bind it to something. when trying to bind it it doesnt even register as Alt, and not as RightAlt either. all i can use it for is to access the Level3.

Yes, neither will likely ctrl or alt or even ctrl+alt by itself.
The suggestion was to instead of bindinding ctrl+alt+o, bind altgr+o

setxkbmap -print -query

Online

Board footer

Powered by FluxBB