Mouse on LHS - ESC Key

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Mouse on LHS - ESC Key

electrosteam
I am right-handed.

But, many years ago I realised that doing ordinary office tasks at a work-station meant that I was repeatedly exchanging mouse for pen in the right hand.
One day, I simply picked up the mouse and positioned it on the LHS, and trained myself to use the mouse in that position.
It is now my normal arrangement.

Note that the mouse is a standard RH one, it does not have the buttons swapped.
But, most importantly, the buttons span all the way to the sides so that a tennis-racket grip allows comfortable operation of the buttons - try it, it really does work better.

I enjoyed the look of exasperation on the face of the IT people whenever they attended to duties at my work-station !

Now, however, I am working at a disability in that the ESC key is poorly positioned for LibreCad tasks.

What I would like to do is assign the top right hand key on my keypad as the ESC key.
The key at this location appears to be different on every keyboard I examine.
On my 2002 build Dell laptop the key has a symbol that looks like text in a box with an arrow pointing to the text.
Testing the button in various applications seems to show it as initiating a drop-down dialog box, in Firefox it duplicates the Edit dialog box.

So, do any other users arrange their work area anything like this ?
Have others re-allocated a key to fulfil the duties of the ESC key ?
Are their better alternatives for ESC ?

John.
Reply | Threaded
Open this post in threaded view
|

Re: Mouse on LHS - ESC Key

rolgiati
On Wed, 22 Nov 2017 02:00:51 -0700 (MST)
"electrosteam [via LibreCAD]" <[hidden email]> wrote:

> So, do any other users arrange their work area anything like this ?
> Have others re-allocated a key to fulfil the duties of the ESC key ?
> Are their better alternatives for ESC ?

It might help us give you an answer if we knew under what operating system you are running LibreCAD  ;-3)
 
Cheers,
 
Ron.
--
                     Government lies, and newspapers lie,
                 but in a democracy they are different lies.
                                   
                   -- http://www.olgiati-in-paraguay.org --
 
Reply | Threaded
Open this post in threaded view
|

Re: Mouse on LHS - ESC Key

electrosteam
Ron,
My system is Lubuntu 17.04 with LibreCad 2.1.2.
John
Reply | Threaded
Open this post in threaded view
|

Re: Mouse on LHS - ESC Key

rolgiati
On Wed, 22 Nov 2017 05:19:52 -0700 (MST)
"electrosteam [via LibreCAD]" <[hidden email]> wrote:

> My system is Lubuntu 17.04 with LibreCad 2.1.2

In a Linux system you should be able to launch LibreCAD inside a bash script that first uses xmodmap to change the affectation of the key you want to use as ESC, and restores it to its initial value before exiting.
 
Cheers,
 
Ron.
--
                  A fanatic is one who can't change his mind
                        and won't change the subject.
                                        -- Winston Churchill
                                   
                   -- http://www.olgiati-in-paraguay.org --
 
Reply | Threaded
Open this post in threaded view
|

Re: Mouse on LHS - ESC Key

electrosteam
Ron,
Thanks for that suggestion.
I have been searching for key allocation approaches and found a few methods, including xmodmap, but I was hesitant to do the change permanently because of possible effects on other applications.

Your suggestion of doing it only for LibreCad with a bash script sounds like a great approach.

John
Reply | Threaded
Open this post in threaded view
|

Re: Mouse on LHS - ESC Key

rolgiati
On Wed, 22 Nov 2017 13:29:33 -0700 (MST)
"electrosteam [via LibreCAD]" <[hidden email]> wrote:

> Thanks for that suggestion.
> I have been searching for key allocation approaches and found a few methods,
> including xmodmap, but I was hesitant to do the change permanently because
> of possible effects on other applications.
>
> Your suggestion of doing it only for LibreCad with a bash script sounds like
> a great approach.

But do not forget that, while LibreCAD is open the key affectation will also be active for all other programs running at the sale time  ;-3)
 
Cheers,
 
Ron.
--
                            Computers are useless.
                       They can only give you answers.
                                       -- Pablo Picasso
                                   
                   -- http://www.olgiati-in-paraguay.org --
 
Reply | Threaded
Open this post in threaded view
|

Re: Mouse on LHS - ESC Key

electrosteam
Tested the key allocations at the command line using: ~$ xev / grep -Fi key
Results were: Escape key = Code 9, Menu key = Code 135.

Did a test re-allocation on the command line: ~$ xmodmap -e "keycode 135 = Escape"

Then launched LibreCad and tested by drawing a couple of lines - SUCCESS.
Works a treat.

At the moment, Lubuntu is refusing to divulge just where/how/when the keyboard is mapped, but persistence will pay off.

John
Reply | Threaded
Open this post in threaded view
|

Re: Mouse on LHS - ESC Key

electrosteam
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
Reply | Threaded
Open this post in threaded view
|

Re: Mouse on LHS - ESC Key

electrosteam
I have re-read the specification for desktop entry and did some experimenting.

You do not need the copy of the file in ..../home/share/applications.
This approach is used when the file to be executed is more than the trivial executable line that I am using.
My entire file with the executable line is in the desktop folder.

There is also a suggested requirement that the file be named with a ".desktop" extension.
Mine are not, and they work.
It could be the ".desktop" file extension only applies to the file in ..../applications, when that approach is used.

John