[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: What's the simplest way to map "CTRL + ALT" to "AltGr" [query]



On Sat 10 Jun 2023 at 09:52:43 (+0000), Ottavio Caruso wrote:
> Is there a simple way, without installing gazillion programs and
> tweaking tens of configuration files, to have at startup the
> combination of CTRL and left ALT produce the same result as AltGr?
> This must work for both console and Xorg.

Take a look at /usr/share/X11/xkb/rules/base.lst where you
see that grp changes to another layout; "switch" means holding
the shifting key to switch, whereas "toggle" means tap it
without having to hold it down (like accessibility shift keys
typically work).

  grp:toggle           Right Alt

appears to show the definition for AltGr, so your equivalent
would seem to be

  grp:ctrl_alt_toggle  Alt+Ctrl

and your file shows the WinKey + SpaceBar definition. There are
examples that use this last key combination in the Arch wiki.

As for consoles, I've not used grp in keyboard definitions myself.

> $ cat .xsessionrc

I use /etc/default/locale to set locale variables, viz:

$ cat /etc/default/locale 
# LC_CTYPE added to overall C
# This file gets (generated and) updated by update-locale,
# but the contents should remain stable under normal circumstances.
LANG=C.UTF-8
LC_CTYPE="en_GB.UTF-8"
#
$ 

Cheers,
David.


Reply to: