this post was submitted on 26 Nov 2023
19 points (82.8% liked)
Linux
48061 readers
708 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
There are several readily available key modifiers in Linux: Meta, Super and ISO-Level3-Shift. You can map them to keys and use them for various purposes.
What I do is map Meta to the left Windows key, Super to the right Windows key, and ISO-Level3-Shift to AltGr (that one might already be default). You can then use Super and Meta as modifiers to trigger all kinds of actions, like Super+T to open a terminal, Super+F to toggle fullscreen mode for current window, Super+Space to toggle music playback etc.
ISO-Level3-Shift will create diacritics when combined with normal keys, provided you choose the correct keyboard layout. This is useful for being able to type correctly in languages that use diacritics, but to also allow you to use a generic US keyboard so you can do programming for example.
To make these mappings you have to edit or create a file called
.Xmodmap
in your home dir. To bind a keycode to a physical key you say something likekeycode 134 = Super_R
, where 134 is a physical key code that you get from the toolxev
and Super_R is the code for what you want it to do. Also, to make Super_R a modifier you have to sayclear Mod4
andadd Mod4 = Super_R
. Most desktop environment will import.Xmodmap
automatically on startup but if they don't you can runxmodmap ~/.Xmodmap
.Once you got Super acting like a modifier and bind it to the key you want your desktop environment settings will probably let you define custom shortcuts for anything you want. Please note that there's usually two different places for such shortcuts, one for generic shortcuts (for launching apps), usually in the keyboard section of preferences, and one where you can tie shortcuts to window functions (like minimize/maximize), usually found in the window section of preferences. Also in the window preferences you can do some cool stuff like use one of these modifiers to drag or resize windows.
Also see if your keyboard preferences let you pick a "compose key". The Pause key is usually used for this, because it's not useful for anything else on a graphical desktop. The compose key lets you create diacritics in an "intuitive" way, by combining two keys. If you press Pause then
o
theno
you get°
. Pause then1
then2
gives you½
. Pause thena
then"
gives youä
. You get the idea.