How to make "{" key with xdotool

110 views Asked by At

I have just switched to Linux A and I want to make custom macros and I decided to make them with the library called xdotool. I'm not sure if Python is used in Linux. My goal is to add a macro to easily press the "{" key, but it writes 0 using this code:

xdotool type "{}"

How can I print the { key?

1

There are 1 answers

1
Inflectrix On

Python is cross-platform, just install that and use a module like pyautogui or keyboard to send the inputs.

ex:

# pyautogui
import pyautogui

pyautogui.write('{')

# -----------------------------
# keyboard

import keyboard

keyboard.send("shift+[")