gam17 / QAD

Quantum Aided Design - cad tools plugin for QGIS
GNU General Public License v3.0
27 stars 13 forks source link

Keyboard 'Enter' doesn't work in some numerical inputs at the text window. #39

Closed caprieldeluca closed 4 years ago

caprieldeluca commented 4 years ago

Hi @gam17 , Thank you very much for your work!

QAD is a great plugin and, in my humble opinion, QAD3 might be published to be tested by the community.

I work with the mouse Right Click as keyboard Enter. I don't use the Dynamic Input nor the toolbar icons, I just work with the text window and left and right clicks until they catch fire :-) .

I know that may not be easy to capture the keyboard all the time, since QGIS calls for it when the mouse is on the canvas or just not in the text window. I was adapting myself to click in the commands line before to start typing if I want to run a command different than the previous one, and always use the mouse right click to send an Enter.

There are some inputs that works fine with the Space bar or the keyboard Enter, but others than not. May not be easy to find them, but this is an example:

In the ARRAYPOLAR command, in the Angle between option, (I can't assure that always) keyboard Spaces and Enters seems to work like a character string, and the option must be closed by mouse Right click.

Clipboard01

gam17 commented 4 years ago

Hi Gabriel, can you send me the file qad.ini located in the plugin installation folder ? In this way I will adopt your qad configuration. Thank you gam17

Hi @gam17 [1] , Thank you very much for your work!

QAD is a great plugin and, in my humble opinion, QAD3 might be published to be tested by the community.

I work with the mouse Right Click as keyboard Enter. I don't use the Dynamic Input nor the toolbar icons, I just work with the text window and left and right clicks until they catch fire :-) .

I know that may not be easy to capture the keyboard all the time, since QGIS calls for it when the mouse is on the canvas or just not in the text window. I was adapting myself to click in the commands line before to start typing if I want to run a command different than the previous one, and always use the mouse right click to send an Enter.

There are some inputs that works fine with the Space bar or the keyboard Enter, but others than not. May not be easy to find them, but this is an example:

In the ARRAYPOLAR command, in the Angle between option, (I can't assure that always) keyboard Spaces and Enters seems to work like a character string, and the option must be closed by mouse Right click.

[2]

-- You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub [3], or unsubscribe [4].

Links:

[1] https://github.com/gam17 [2] https://user-images.githubusercontent.com/48416462/74208298-b034a400-4c61-11ea-8587-5542eb493d0d.png [3] https://github.com/gam17/QAD/issues/39?email_source=notifications&email_token=AD52LALK6ANWEQGGL7HZZJTRCII5LA5CNFSM4KSZOFUKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IMN6GAQ [4] https://github.com/notifications/unsubscribe-auth/AD52LAOZNJKBVXDSPUYH7VLRCII5LANCNFSM4KSZOFUA

caprieldeluca commented 4 years ago

@gam17 , Hi,

Here I send the qad.ini zipped file attached.

qad.ini.zip

gam17 commented 4 years ago

Hola Gabriel, lo siuento mucho pero no puedo conseguir tu problema. Usando tu file qad.ini y siguiendo tus istruciones cuando uso el clave "espacio" el comando lo interpreta como un enter correctamente. Puedes escrivir paso a paso detalladamente como repetir el error ? muchas gracias Epero que sea apreciado mi super basico espanol ! gam17

@gam17 [1] , Hi,

Here I send the qad.ini zipped file attached.

qad.ini.zip [2]

-- You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub [3], or unsubscribe [4].

Links:

[1] https://github.com/gam17 [2] https://github.com/gam17/QAD/files/4189109/qad.ini.zip [3] https://github.com/gam17/QAD/issues/39?email_source=notifications&email_token=AD52LANECPJRXX6I6FBHXS3RCMXGBA5CNFSM4KSZOFUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELOQBBI#issuecomment-584908933 [4] https://github.com/notifications/unsubscribe-auth/AD52LAMVW2VUCJIQWRIREVTRCMXGBANCNFSM4KSZOFUA

caprieldeluca commented 4 years ago

Hola gam, gracias por el español! Yo no sé italiano...

I'm attaching a screencast, showing my options and settings, and the behavior.
The keyboard Enter in some sumerical inputs in the command window returns a new line and the keyboard space doesn't close the command. The command was closed by a mouse right click.

test

P.D.: "I'm writting here with spaces" must be seen, the "s" absences were my fault.

caprieldeluca commented 4 years ago

I have noted that the keyboard Space in the command window, with the mouse hover the canvas, is taken by QGIS as a PAN shortcut.

gam17 commented 4 years ago

Great, this is the key ! I noticed that when the canvas has the focus qgis doesn't trasmit all keys you press to QAD. Some keys are always keep in QGIS without tramission of the "key press" event to QAD. This is the case "space bar". For example if you press the space key this event doesn't arrive to QAD because QGIS execute the PAN command.

Other keys can change their behaviour. This is because QGIS uses shortcuts to execute some actions without comunicate the "key press" event to QAD. We can consider to disable all shortcuts when the QAD maptool is active and re-enable them when QAD maptool is inactive. In this way all key pressions will be send to QAD (expect some keys like "space bar"). If you click on the QAD command text window the focus will be moved to that window and in this way all keys you press will be read correctly. Can you try to move the focus on the QAD command text window when you are typing the angle ?

Actually I don't know how to solve this problem. QAD is guest of QGIS and unfortunalty it has to respect its rule...

every idea is welcome !

gam17

I have noted that the keyboard Space in the command window, with the mouse hover the canvas, is taken by QGIS as a PAN shortcut.

-- You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub [1], or unsubscribe [2].

Links:

[1] https://github.com/gam17/QAD/issues/39?email_source=notifications&email_token=AD52LAMNWC7ZRNKFN62SBP3RCVPPBA5CNFSM4KSZOFUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELVLGFY#issuecomment-585806615 [2] https://github.com/notifications/unsubscribe-auth/AD52LAMKJSHOMSQNXYIJ5CTRCVPPBANCNFSM4KSZOFUA

caprieldeluca commented 4 years ago

Hi @gam17 ,

Can you try to move the focus on the QAD command text window when you are typing the angle ?

If I do a click on the QAD text window panel, yes, the space bar works as an ENTER command.
If I just hover the panel, the space bar continues the QGIS PAN behavior, but I think that I am not given QAD the focus with just placing the mouse pointer over the panel.

Also, the space bar seems not to be a customizable QGIS shortcut but a built-in one.

My idea is to adapt me in the use of the mouse right click always that I want to send an ENTER command to QAD. That will be effective in my case, because I don't use the right click customization...

I don't know, but maybe if you can code the Ctrl-Space key event (or something else), instead of the Space bar one, to send ENTER commands to QAD, and include a note in the Documentation about it because the use of the Space bar in QGIS has the PAN command associated might solve the problem... or at least avoid it.

gam17 commented 4 years ago

Hi, I modified QAD to catch the AltGr key pression that works as enter key, now (I could not catch the Ctrl-Space key event). Download and try. Tell me if this can be useful or not, please. bye gam17

Hi @gam17 [1] ,

Can you try to move the focus on the QAD command text window when you are typing the angle ?

If I do a click on the QAD text window panel, yes, the space bar works as an ENTER command. If I just hover the panel, the space bar continues the QGIS PAN behavior, but I think that I am not given QAD the focus with just placing the mouse pointer over the panel.

Also, the space bar seems to not be a customizable shortcut but a built-in one.

My idea is to adapt me in the use of the mouse right click always that I want to send an ENTER command to QAD. That will be effective in my case, because I don't use the right click customization...

I don't know, but maybe if you can code the Ctrl-Space key event (or something else), instead of the Space bar one, to send ENTER commands to QAD, and include a note in the Documentation about it because the use of the Space bar in QGIS has other command associated might solve the problem... or at least avoid it.

-- You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub [2], or unsubscribe [3].

Links:

[1] https://github.com/gam17 [2] https://github.com/gam17/QAD/issues/39?email_source=notifications&email_token=AD52LALT2LPPYA3DOT6XE63RC5BB5A5CNFSM4KSZOFUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEL26GQA#issuecomment-586539840 [3] https://github.com/notifications/unsubscribe-auth/AD52LAOR3EMXQ23N2MCDXW3RC5BB5ANCNFSM4KSZOFUA

gam17 commented 4 years ago

Hi, we can't use the AltGr key because it is already used to compone the "@" character (in combination with another key). The "@" character it is used to specify a coordinate point (like autocad) !

gam17

Hi @gam17 [1] ,

Can you try to move the focus on the QAD command text window when you are typing the angle ?

If I do a click on the QAD text window panel, yes, the space bar works as an ENTER command. If I just hover the panel, the space bar continues the QGIS PAN behavior, but I think that I am not given QAD the focus with just placing the mouse pointer over the panel.

Also, the space bar seems to not be a customizable shortcut but a built-in one.

My idea is to adapt me in the use of the mouse right click always that I want to send an ENTER command to QAD. That will be effective in my case, because I don't use the right click customization...

I don't know, but maybe if you can code the Ctrl-Space key event (or something else), instead of the Space bar one, to send ENTER commands to QAD, and include a note in the Documentation about it because the use of the Space bar in QGIS has other command associated might solve the problem... or at least avoid it.

-- You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub [2], or unsubscribe [3].

Links:

[1] https://github.com/gam17 [2] https://github.com/gam17/QAD/issues/39?email_source=notifications&email_token=AD52LALT2LPPYA3DOT6XE63RC5BB5A5CNFSM4KSZOFUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEL26GQA#issuecomment-586539840 [3] https://github.com/notifications/unsubscribe-auth/AD52LAOR3EMXQ23N2MCDXW3RC5BB5ANCNFSM4KSZOFUA

caprieldeluca commented 4 years ago

Hi @gam17 ,

I was trying to input relative coordinates before, and I can't. I will test it again later and may be ask you about that.

What do you think to preserve the space bar key and just include a note about the need to focus the text window panel if QGIS capture it as a PAN command?

gam17 commented 4 years ago

Hi, I just undo the last change about the use of the "@" key. As you suggest I will add a note about the need to focus the text window panel. What about using dynamic input, it should workaround this problem...

gam17

Hi @gam17 [1] ,

I was trying to input relative coordinates and I can't, I will test it again and may be ask you about that.

What do you think to preserve the space bar key and just include a note about the need to focus the text window panel if QGIS capture it as a PAN command?

-- You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub [2], or unsubscribe [3].

Links:

[1] https://github.com/gam17 [2] https://github.com/gam17/QAD/issues/39?email_source=notifications&email_token=AD52LAPV4EOIGQ3AHEA6263RDL2JBA5CNFSM4KSZOFUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEL7UDHI#issuecomment-587153821 [3] https://github.com/notifications/unsubscribe-auth/AD52LAOPJXMVQH6GOSV3YH3RDL2JBANCNFSM4KSZOFUA