this post was submitted on 15 Apr 2025
22 points (89.3% liked)

You Should Know

37496 readers
7 users here now

YSK - for all the things that can make your life easier!

The rules for posting and commenting, besides the rules defined here for lemmy.world, are as follows:

Rules (interactive)


Rule 1- All posts must begin with YSK.

All posts must begin with YSK. If you're a Mastodon user, then include YSK after @youshouldknow. This is a community to share tips and tricks that will help you improve your life.



Rule 2- Your post body text must include the reason "Why" YSK:

**In your post's text body, you must include the reason "Why" YSK: It’s helpful for readability, and informs readers about the importance of the content. **



Rule 3- Do not seek mental, medical and professional help here.

Do not seek mental, medical and professional help here. Breaking this rule will not get you or your post removed, but it will put you at risk, and possibly in danger.



Rule 4- No self promotion or upvote-farming of any kind.

That's it.



Rule 5- No baiting or sealioning or promoting an agenda.

Posts and comments which, instead of being of an innocuous nature, are specifically intended (based on reports and in the opinion of our crack moderation team) to bait users into ideological wars on charged political topics will be removed and the authors warned - or banned - depending on severity.



Rule 6- Regarding non-YSK posts.

Provided it is about the community itself, you may post non-YSK posts using the [META] tag on your post title.



Rule 7- You can't harass or disturb other members.

If you harass or discriminate against any individual member, you will be removed.

If you are a member, sympathizer or a resemblant of a movement that is known to largely hate, mock, discriminate against, and/or want to take lives of a group of people and you were provably vocal about your hate, then you will be banned on sight.

For further explanation, clarification and feedback about this rule, you may follow this link.



Rule 8- All comments should try to stay relevant to their parent content.



Rule 9- Reposts from other platforms are not allowed.

Let everyone have their own content.



Rule 10- The majority of bots aren't allowed to participate here.

Unless included in our Whitelist for Bots, your bot will not be allowed to participate in this community. To have your bot whitelisted, please contact the moderators for a short review.



Rule 11- Posts must actually be true: Disiniformation, trolling, and being misleading will not be tolerated. Repeated or egregious attempts will earn you a ban. This also applies to filing reports: If you continually file false reports YOU WILL BE BANNED! We can see who reports what, and shenanigans will not be tolerated.



Partnered Communities:

You can view our partnered communities list by following this link. To partner with our community and be included, you are free to message the moderators or comment on a pinned post.

Community Moderation

For inquiry on becoming a moderator of this community, you may comment on the pinned post of the time, or simply shoot a message to the current moderators.

Credits

Our icon(masterpiece) was made by @clen15!

founded 2 years ago
MODERATORS
 

Many people might already be knowing this, for example people who use custom keyboard layouts, or people using different keyboard layouts, other than US, which most manufacturers and operating system and desktop environmnets use as default.

Most of my applications use vi like bindings, so pressing shift + ; to get : was a bit annoying, and so i was trying to find a way to swap them, and while doing so, I added most of greek alphabet, makes my technical writing a bit more easier (instead of doing $alpha$, I can do alt + a to get $α$), If you use TeX, then you can use #XeTeX to enter unicode, I use Typst, so I can directly use them, and they are used appropriately in text and equation mode. This also is helpful if your notes system does not have some math mode rendering (like plain markdown, without any katex).

If you are multilingual, but don't write much in the other language, this approach works well, if you write comparable amount in both languages, then you should consider setting a keyboard shortcut in you DE/WM config to switch the keyboard layouts

The following procedure is linux specific (or maybe other posix systems too, if they use xkb to manage keyboard stuff (this also works on wayland)), but I am sure windows and macos will have something similar (though i have not bothered to check for it, sorry for that). This does not work as a daemon sitting in between, this is using the standard way to modiify keyboard layout.

You can start by making a file like the following, and you can start with /usr/share/X11/xkb/symbols/us (or the base language of your choice, for most european language layouts, base is /usr/share/X11/xkb/symbols/latin). You have to save it in the /usr/share/X11/xkb/symbols/ directory (in my case, my original file is in config dir, and I have symlinked it to /usr/share/X11/xkb/symbols/us-custom). For list of valid symbols (most of unicode, the thing we want is the correct names) please refer /usr/include/X11/keysymdef.h. You can choose what modifier you want to use with include "level3(ralt_switch)" - I am using right alt as the third modifier, so to get the third layer, I go alt + <key>, for 4th layer, mod3 + shift + <key>. Then you can set to use this custom symbol map in your DE/WM config, in my case I have added xkb_layout "us-custom" in my sway config (for input keyboard).

// parent system is US, with a lot of greek sybols appended, and some more
// ; -> :, : -> ; - mostly for vim modes (easier to do : now)
default partial alphanumeric_keys modifier_keys
xkb_symbols "basic" {
    name[Group1]= "English US - Custom"; 
    include "level3(ralt_switch)"

    key <TLDE> {[ grave, asciitilde ]};
    key <AE01> {[ 1, exclam, exclamdown ]};
    key <AE02> {[ 2, at ]};
    key <AE03> {[ 3, numbersign, Greek_pi ]};
    key <AE04> {[ 4, dollar, trademark ]};
    key <AE05> {[ 5, percent ]};
    key <AE06> {[ 6, asciicircum ]};
    key <AE07> {[ 7, ampersand ]};
    key <AE08> {[ 8, asterisk, Greek_PI ]};
    key <AE09> {[ 9, parenleft ]};
    key <AE10> {[ 0, parenright, degree, schwa ]};
    key <AE11> {[ minus, underscore ]};
    key <AE12> {[ equal, plus, plusminus ]};

    key <AD01> {[ q, Q ]};
    key <AD02> {[ w, W ]};
    key <AD03> {[ e, E, Greek_epsilon, eacute ]};
    key <AD04> {[ r, R, Greek_rho ]};
    key <AD05> {[ t, T, Greek_theta, Greek_tau ]};
    key <AD06> {[ y, Y ]};
    key <AD07> {[ u, U ]};
    key <AD08> {[ i, I, integral ]};
    key <AD09> {[ o, O, Greek_omega, Greek_OMEGA ]};
    key <AD10> {[ p, P, Greek_phi, Greek_psi ]};
    key <AD11> {[ bracketleft, braceleft ]};
    key <AD12> {[ bracketright, braceright ]};

    key <AC01> {[ a, A, Greek_alpha, ae ]};
    key <AC02> {[ s, S, Greek_sigma, Greek_SIGMA ]};
    key <AC03> {[ d, D, Greek_delta, Greek_DELTA ]};
    key <AC04> {[ f, F ]};
    key <AC05> {[ g, G, Greek_gamma, Greek_GAMMA ]};
    key <AC06> {[ h, H, Greek_eta ]};
    key <AC07> {[ j, J ]};
    key <AC08> {[ k, K, Greek_kappa ]};
    key <AC09> {[ l, L, Greek_lambda, Greek_LAMBDA ]};
    key <AC10> {[ colon, semicolon ]};
    key <AC11> {[ apostrophe, quotedbl ]};
    key <BKSL> {[ backslash, bar ]};

    key <AB01> {[ z, Z, Greek_zeta ]};
    key <AB02> {[ x, X, Greek_xi, Greek_XI ]};
    key <AB03> {[ c, C, Greek_chi ]};
    key <AB04> {[ v, V ]};
    key <AB05> {[ b, B, Greek_beta ]};
    key <AB06> {[ n, N, Greek_nu, ntilde ]};
    key <AB07> {[ m, M, mu ]};
    key <AB08> {[ comma, less ]};
    key <AB09> {[ period, greater ]};
    key <AB10> {[ slash, question, questiondown ]};
};

you are viewing a single comment's thread
view the rest of the comments
[–] victorz@lemmy.world 2 points 1 week ago* (last edited 1 week ago) (4 children)

Also have a look at Kanata to enable your keyboard to have multiple custom layers and other functionality like tap-dancing, even if you don't have a custom keyboard. I tried it, it works pretty well.

[–] sga 1 points 1 week ago (1 children)

sorry i am unware of it. I looked up, and from github page they are are remapper. They are great too, but they are a additional thing to install and run. For layers, you can already use keyboard shortcut to switch between predefined layouts in most setups, but thanks

[–] victorz@lemmy.world 2 points 5 days ago (1 children)

Kanata is not only a remapper, and layers are not used only to switch language layouts. It is much, much more powerful than that. And with a much simpler configuration than what you have described.

The extra thing to install is a lot less of a hassle than learning the config you have posted. That's my personal opinion. 😁

You found your solution that works for you. That's great. Kanata is a tip for people who want even more power from their regular keyboard than what is possible without it. If you don't need this power, don't install. 👍

[–] sga 1 points 5 days ago (1 children)

well i would like to understand what can you do with it. Also, simplicity is in the eye of beholder

[–] victorz@lemmy.world 2 points 3 days ago* (last edited 3 days ago)

Also, simplicity is in the eye of beholder

I did explicitly say it was my personal opinion. 🙂

i would like to understand what can you do with it

You can have multiple functions per key, like holding a key for a longer period. It can then output something completely custom, or act as a modifier, or switch layers when held. You can also "tap dance", meaning if you tap a key more than once you can output different things, like double tap "a" for "å" e.g. You can also tap two keys at the same time to do different things, like tap E and = at the same time for a € or something. Very powerful stuff. 👍

load more comments (2 replies)