The issue seems to be Keysharp interfering!
Original post:
I have this set up as a startup script, but it only sometimes triggers, despite setting a 20-second delay:
#!/bin/bash
sleep 2
xmodmap -e "clear lock"
xmodmap -e "keycode 66 = Return"
I have the startup command set to bash "path/Remap_Caps_Lock_to_Enter.sh". What’s going on? It works when I press the triangle button when it doesn’t work on boot.


If I am not mistaken, Linux Mint settings service uses
xkeyboard-config.-–
-–
<option> <configItem> <name>caps:return</name> <description>Make Caps Lock an additional Return key</description> </configItem> </option>Source
The actual commit: 6b30f36201b40fddcf28918eb4c96b13a23b42ae
Yet, I’ve checked in a virtual machine online, and there’s no such, apparently, indeed (sorry).
However, I believe it’s possible to modify it manually in file
/usr/share/X11/xkb/rules/evdev.xml, and I’ve tried quickly the following (after changes to the file, restart thecsd-keyboard; e.g., by killing it). Would it work in your case (I would also try rebooting after)?:Screenshot
Oh, sweet, huh, nice. Thanks a ton for the research; I totally didn’t think to go this route. I’ll try it when I next can!
Update: So, @Artwork@lemmy.world (I don’t know if this will notify you), unfortunately, I did get around to finally trying it but even though the XKB option is picked, it doesn’t seem to actually do anything despite rebooting… but I sure appreciate you poking around and trying; I didn’t even know that file existed or could be modified.
Wonderful day! Yes, thank you! I got the notification for the edit! Marvelous Lemmy!
The main idea is that it feels like a keyboard layout system service executes after your initial script and hence you notice no difference.
I am sorry, but I am not sure I’ll be able to support the case at this moment, or at least a week, thoughtfully enough to be supportive, considering the job and time availability… I am sorry…
Meanwhile, have you considered responding in the forum above that restarting the services, after editing the file, and select the option, do not affect the key events processing?
Also, have you tried clarifying with other experienced people at IRC? Some networks, as Libera (most people from Freenode) and OFTC, may have those who have more time right now, and possibly had your very case, too?:
- https://libera.chat/guides/clients#terminal-clients
- https://www.oftc.net/
- https://netsplit.de/channels/?chat=mint
I’ve been known on Libera with a nickname as Lore (e.g., channel
#linux), but they banned me again, long ago, unfortunately, for trying to protect myself against trolls… so please be careful! Yet, there are indeed truly ingenious, incredibly people!Oh! Please also consider sharing the solution when found!
Dang, sorry to read about your ban. By the way, I think it is Keysharp that is causing the problem because it seems to be working just fine when I have that app disabled. I do like it a lot though, so I’ll keep tinkering and finding some way to possibly try to get both of them to work concurrently. It uses Microsoft’s .NET 10 runtime, but the latest versions have been having issues on my PC, so I’ve been going without Keysharp, and the Caps Lock reconfiguration is working flawlessly, haha. Thanks for your patience!
Thank you for the update! Just to clarify, I am sorry, what is KeySharp exactly? Is it one of the following?:
- https://github.com/goaaats/KeySharp
- https://github.com/mfeemster/keysharp
- https://apps.microsoft.com/detail/9nkmq5kbjg59
None of the above, ironically; it’s: https://github.com/Descolada/Keysharp