So this is the power of linux...
>>105744117irrelevant. The question should rather be, why does the most costumizable, secure, privacy and pronoun respecting commie OS not support this? And why can this be done on Windows without taking the whole system apart?
>>105744102 (OP)>>105744117>>105744181code it yourself in python, its 2 lines of code
2nd result for "linux toggle shift key"
https://old.reddit.com/r/linuxquestions/comments/1d9g1am/how_to_make_the_shift_key_a_toggle/
>>105744198the guy in the pic wants to write a macro that emulates the shift key. I highly doubt that the macro interpreter has any python bindings. At least AHK on windows doesnt.
>>105744238the windows api has that function
I don't get it, why a shift toggle and not caps lock? Use case?
>>105744198i think the guy in the pic wants to write a macro that involves toggling the shift key. I dont think the macro interpreter has python bindings. At least Autohotkey for windows doesnt.
>>105744243yep.
>>105744292KEY REMAPPING YOU FUCKING TROONIX TOOL
yes I use capslock because I'm dead serious, your kind are fucking useless idiot
>>105744295>I dont think the macro interpreter has python bindingswhat bindings? just emulate the keypress of the shift key to always be down
>>105744102 (OP)why not https://github.com/rvaiya/keyd ? Literally first result in google
>>105744102 (OP)I experienced this, but with wayland, it was such unstable garbage that I had to go back to x11
>>105744302How about stop being a DYEL bitch and realize that clicking shift when you need it is not an issue?
So you're asking for a piece of software that changes shift to capslock despite everyone in history just moving their little finger up half an inch when typing?
>>105744327>>105744327yeah keyd works for me
that guy is just retarded
>>105744304If I wanted to execute a hypothetical combo in a video game made up of a sequence of keys including "Shift" by simply pressing "Q", i would have to be able to emulate shift along with the rest of the keys in the combo sequence (with delays in between). Simply pressing "Q" to emulate "Shift" using python would not help his case. Also, factor in other conditional macro shortcuts to emulate other key sequences.
Based on the discussion, the user wants to toggle the Shift key (tap once for "on," tap again for "off") instead of holding it down. Here's how to solve this on Linux:
### Recommended Solution: Use `keyd` (Works on X11/Wayland)
1. **Install `keyd`**:
bash
git clone https://github.com/rvaiya/keyd
cd keyd
make && sudo make install
sudo systemctl enable --now keyd
2. **Configure**:
Edit `/etc/keyd/default.conf`:
ini
[ids]
*
[main]
# Make left Shift a toggle key
leftshift = toggle(shift)
# Optional: Disable right Shift or leave as normal
rightshift = overload(shift, rshift)
3. **Reload**:
bash
sudo systemctl restart keyd
### Alternative Solutions
- **For X11 (Older Systems)**:
Use `xmodmap` to remap keys, but this requires scripting to emulate toggle behavior.
- **Python/`evdev`** (Advanced):
Create a script to intercept Shift key events and toggle state (complex, not recommended for beginners).
### Why This Works
- `keyd` handles key remapping at the kernel level, working reliably across desktop environments (GNOME, KDE, etc.) and display servers (X11/Wayland).
- The `toggle(shift)` function converts the key into a sticky/latching key (like Caps Lock but for Shift).
### Notes
- **Caps Lock vs. Shift**: The user specifically wants Shift toggled (not Caps Lock), likely for gaming or accessibility.
- **Windows Comparison**: Windows has native APIs for this (e.g., `SetKeyboardState`), but Linux requires tools like `keyd` for similar flexibility.
Test immediately after configuring. If issues occur, check logs with `journalctl -u keyd -f`.
>>105744381/thread
should have just asked chatgpt from the beginning
qq
md5: c31ff361e36023d6dbd646b78f5b8f0f
🔍
>computers went wrong when they made them for niggers