• First note that, for the Ctrl+F10 to work, the file pane must be active. For me, for example, the shortcut does not work when starting up Files, because the keyboard focus is in the left bar. So when testing, ensure that the file pane is in focus.
• For me, what works more reliably than -clearmodifiers
is to explicitly clear the shortcut you assign to the command. Instead, I would rather insert a keyup
command, as in:
xdotool keyup ctrl+alt+shift+t key ctrl+F10 e
With these two precautions, I believe it should work, although it is sometimes needed to insert a small delay:
xdotool keyup ctrl+alt+shift+t sleep 0.2 key ctrl+F10 e
Experiment with the value of the sleep
command: perhaps it must be longer than 0.2 s.
Some related remarks
You are asking what could be considered an XY question here. Your real problem, X, is how to assign a custom shortcut to "Open terminal here" in Nautilus. You however ask about problem Y, which is about what you think is the best solution to solve problem X.
Unfortunately, methods to do so have systematically been broken. Up to Files in Ubuntu 20.04, you still could conveniently work around with the ~/.config/nautilus/scripts-accels
file, where you could define a shortcut to a nautilus script. That approach also does not anymore work in Ubuntu 20.10. So I encourage you to continue exploring this option. However, you would better work with a script that first checks whether the current window is nautilus
before activating the xdotool
command. Gnome shortcut definitions are global, and are triggered also when you are in a different application.
gnome-terminal
or thexdotool key --clearmodifiers ctrl+F10 e
? If you mean the latter my answer makes no sense and I'll remove it. – cprn Jul 30 '21 at 12:45