Re: Mouse on LHS - ESC Key
Posted by electrosteam on
URL: https://forum.librecad.org/Mouse-on-LHS-ESC-Key-tp5715482p5715497.html
Still not sure of the "where/how/when", but along the line I discovered 'Desktop Entry', a means of putting a script on the desktop - perfect.
Played around for a while, and ended up with two desktop scripts that are set up to execute, 'Menu to Escape' and 'Escape to Menu'.
They are written with Leafpad directly on the desktop.
The first:
[Desktop Entry]
Name = Menu to Escape
Exec=/bin/bash -c ' xmodmap -e "keycode 135 = Escape" '
Type = Application
Terminal = True
# copy in $Home/local/share/applications
The second just swaps 'Escape' for 'Menu'.
Note reminder about copying to .../share/applications.
Now I can just re-allocate the key in the middle of any application by dropping down to the desktop and initiating.
The scripts take quite a few seconds to complete, can't help but think the actions are not efficient, so a bit more investigation is in order.
John