You are not logged in.

#1 2021-03-11 20:22:44

Scraft161
Member
Registered: 2021-03-11
Posts: 2

switch keyboard layout if caps-lock is active

I am learning another (non-roman) language and I want to be able to easily input the characters provided by that language's writing system.

After thinking about it for a couple minutes the idea of switching keyboard layouts with a hotkey came to mind with the (unused) caps lock key coming to mind.
The idea is that I would have my standard (non-US) keyboard active by default so I can type normally, and to switch to the secondary (non-roman) keyboard when caps-lock is active (with the light to indicate that mode)

The problem here is that I am using a tiling WM (DWM to be specific) and thus can't rely on the utilities provided a a full DE (not that any of them fit those demand anyway)

Does anyone know a tool or some X11 API that allows me to achieve this functionality.


Kind regards, Scraft161

Offline

#2 2021-03-19 22:09:25

Lord Bo
Member
Registered: 2012-11-11
Posts: 168

Re: switch keyboard layout if caps-lock is active

Well, have You tried to look into the wiki? There's an entry exacly describing how to achieve what You want with Xorg.

Offline

#3 2021-03-19 23:34:52

Scraft161
Member
Registered: 2021-03-11
Posts: 2

Re: switch keyboard layout if caps-lock is active

If I had found it on the wiki I wouldn't have made a forum account just to post this.
I did end up finding something with iBus or other input method engines at this archwiki article but I haven't been able to sucsesfully get any of them to work.
If you weren't referring to that wiki page could you link what you found as I might have been looking for the wrong keywords.
I also think that what I was trying to do when I wrote the post might not be going about it in the correct way as most ways of achieving this would be quite hacky, So I've been looking at other ways I could go about solving this issue.

Offline

#4 2021-03-20 10:51:25

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,429

Re: switch keyboard layout if caps-lock is active

The wiki page you are looking for is https://wiki.archlinux.org/index.php/Xo … figuration which contains a plethora of ways of applying the configuration and under the Switch between Layouts section a direct example with caps lock

Offline

#5 2021-03-25 06:14:52

Lord Bo
Member
Registered: 2012-11-11
Posts: 168

Re: switch keyboard layout if caps-lock is active

Sorry, I hadn't answered to your topic, because I had forgotten to subscribe to it ...

Offline

Board footer

Powered by FluxBB