You are not logged in.
Pages: 1
Yo might notice I don't use the button between y and i on my keyboard because I set it to press middle mouse button in an experiment and now it won't change back. It will fix itself when the startup scripts run though. The ultimate goal is to assign this the other way around. I have tried sing imwheel with the following imwheelrc:
"^gimp$"
None, Button2, uThen running imwheel with the flags: -d -D -k -b 2. This did not work as it didn't read the event correctly.
I then tried sing xkbset with
xkbset exp =m
#RETRNS: zsh: m not fond
xkbset m
xmodmap -e "Pointer_Button2 = keycode 30" #Spelled correctlyI am now at a loss about how to achieve this goal. It must also be able to be togglable preferably just working in one program.
Last edited by DAMO238 (2020-04-08 17:49:24)
Offline
I set it to press middle mose btton in an experiment and now it won't change back...
And how did you set this up? It's easy to change back, just undo what you did, and restart X.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
You might also want to check your U key.
SCNR
Inofficial first vice president of the Rust Evangelism Strike Force
Offline
I have fixed my U key now, but I still need to bind my middle mouse button to the U key. The way I bound it the other way around was using
xmodmap -e "keycode 30 = Pointer_Button2" which of course is just a temporal change, so I wasn't really worried about the long term impact of that. Unfortunately, this does not work the other way around.
Offline
I have found a solution, it's a little hacky but it works. I am using xbindkeys with two .xbindkeysrcs, one is empty the other has
"xdotool key 30"
b:2I then wrote the following script:
#!/bin/sh
case $1 in
"start")
[ -f ~/.xbindkeys.start ] && mv ~/.xbindkeysrc ~/.xbindkeys.stop && mv ~/.xbindkeys.start ~/.xbindkeysrc || echo "Already running, refreshing rc file..."
xbindkeys --poll-rc
;;
"stop")
[ -f ~/.xbindkeys.stop ] && mv ~/.xbindkeysrc ~/.xbindkeys.start && mv ~/.xbindkeys.stop ~/.xbindkeysrc || echo "Already stopped, refreshing rc file..."
xbindkeys --poll-rc
;;
"toggle")
[ -f ~/.xbindkeys.stop ] && mv ~/.xbindkeysrc ~/.xbindkeys.start && mv ~/.xbindkeys.stop ~/.xbindkeysrc || \
([ -f ~/.xbindkeys.start ] && mv ~/.xbindkeysrc ~/.xbindkeys.stop && mv ~/.xbindkeys.start ~/.xbindkeysrc)
xbindkeys --poll-rc
;;
*)
echo "Usage: tablet_binding {start|stop|toggle}"
esacwhich I use to control whether it is on or not.
Offline
There's no reason to run xbindkeys with an emptyrc. That can all be much simpler, just have your ~/.xbindkeysrc to do what you want, then your script is just this:
#!/bin/sh
case $1 in
"start") xbindkeys ;;
"stop") killall xbindkeys ;;
"toggle") killall xbindkeys || xbindkeys ;;
*) echo "Usage: tablet_binding {start|stop|toggle}"
esac"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
That is true, but I might want to add stuff to the empty rc, so that is why I designed it like that. Great suggestion though, thanks!
Offline
Pages: 1