Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 91 <-kyecode kropki na numerycznej
- Znalezc urzadzenie: xinput --list
- Tak mozna znalezc klawisz: xinput --test "BTC USB Multimedia Keyboard"
- autoclicer w bashu
- xdotool click --delay 5 --repeat 900000 1
- Bit late here, but here is a solution.
- By typing xinput --list, you get a list of all the input devices in your system.
- The trick is with xinput --query-state.
- If you go into terminal and you list the inputs, you can then do xinput --query-state [YourKeyboard].
- 1 class :
- KeyClass
- key[0]=up
- key[1]=up
- key[2]=up
- ...
- Now, you will need to hold down the key, so you can either
- Use > to write to a file, letting you hold down the key when you execute the command
- Make a quick bash script
- while true; do
- xinput --query-state [YourKeyboard] | grep 'down'
- done
- # StackExchange does not like bash
- EDIT: I am not on Linux right now, so I cannot try this, but I heard you can use xinput --test as well
- Once you find the correct key, make a script like this.
- ?????????????????
- #!/bin/bash
- while true; do
- inp=`xinput --query-state <KEYBOARD#ID> | grep -o 'button\[<KEYBOARD#BUTTON>\]=down'`
- if [ ! -z "$inp" ]; then
- xdotool click 1
- fi
- done
- ?????????????
- This will spam click the mouse button while the user holds down a button
- ------------
- #!/bin/bash
- # 91 = kropka na numerycznej
- # 24 = 'q'
- while true; do
- inp=$(xinput --query-state 'BTC USB Multimedia Keyboard' | grep -o 'key\[24\]=down')
- if [ ! -z "$inp" ]
- then
- xdotool click --delay 5 --repeat 50 1
- else
- sleep 1
- fi
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement