Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a key catcher line edit to get modifier(s) for recent macros + small fixes #5404

Merged
merged 4 commits into from Jan 24, 2022

Conversation

0penBrain
Copy link
Contributor

https://forum.freecadweb.org/viewtopic.php?t=65081

@mwganson could you please have a look at this ?

@github-actions github-actions bot added the Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD label Jan 20, 2022
@mwganson
Copy link
Contributor

Looks great. I compiled and tested, only issue I found was the Right Ctrl key is not recognized. It works for the Left Ctrl and all the others, Shift, Alt, Meta on both sides, just not for Right Ctrl. I know my keyboard is okay because when I press either Ctrl key I get a little circle on the screen to help locate the mouse pointer.

I'll defer to you on the translation.

Somewhat related, I get these warnings in the report view even after deleting config files. This is not new to this PR.

12:49:09 Accelerator conflict between Std_Refresh (Ctrl+R) and Std_Recompute (Ctrl+R)
12:49:09 Accelerator conflict between Std_Macro_0 (none) and Std_Macro_1 (tidak ada)
12:49:09 Accelerator conflict between Std_Macro_1 (tidak ada) and Std_Macro_0 (none)
12:49:09 Accelerator conflict between Std_Macro_5 (none) and Std_Macro_0 (none)
12:49:09 Accelerator conflict between Std_Macro_6 (none) and Std_Macro_0 (none)
12:49:09 Accelerator conflict between Std_Macro_7 (none) and Std_Macro_0 (none)
12:49:09 Accelerator conflict between Std_Macro_8 (none) and Std_Macro_0 (none)
12:49:09 Accelerator conflict between Std_Macro_9 (none) and Std_Macro_0 (none)
12:49:09 Accelerator conflict between Std_ViewFullscreen (F11) and Std_MacroStepInto (F11)
12:49:09 Accelerator conflict between Std_MacroStepInto (F11) and Std_ViewFullscreen (F11)

It appears "tidak ada" translates to naught, nix, nought, so I guess None.
Std_Macro_5 through Std_Macro_9 have no shortcut assigned, yet still show conflicts.
Std_Macro_0 has none, yet conflicts with Std_Macro_1 (tidak ada)

Snip macro screenshot-104ff0
Snip macro screenshot-0caade

@0penBrain 0penBrain marked this pull request as draft January 20, 2022 19:35
@0penBrain
Copy link
Contributor Author

@mwganson Thx for fast review. Will have a look on tomorrow and feedback. Setting PR as Draft till there.

@0penBrain
Copy link
Contributor Author

@mwganson I don't have the same problem as you. Right Ctrl is perfectly working, and actually from Qt code it is strange that you have this issue. Also I don't have same issue with weird shortcut conflicts to be reported. ATM I would suspect something very specific with your setup.
Could you please run the attached macro then press left Ctrl with focus on the upper field, press right Ctrl with focus on the lower field, and report result ?

testCtrl.FCMacro.zip

@mwganson
Copy link
Contributor

I have resolved all the previous issues. The PR is good to go as far as I am concerned.

Regarding the right Ctrl issue: I am compiling inside a VirtualBox virtual machine with Windows as the host and Ubuntu as the guest. Virtual Box uses right ctrl + home as a shortcut for opening the Virtual Box context menu from inside the guest. By changing that from right ctrl to right alt, I have fixed the conflict and now I get the expected behavior from the macro and presumably from the preferences. I can't test preferences at the moment because I would have to build the PR again.

The shortcut warnings I have resolved by using the reset button the edit menu -> preferences dialog. Deleting the config files didn't work because (I'm guessing here a bit) these files were recently moved to a new location in linux to conform with some standard. I still get a few warnings, but these are all valid warnings about conflicting shortcuts, and nothing to do with macros.

@0penBrain
Copy link
Contributor Author

@mwganson Yes, in VB, right Ctrl is the default Host key (used for all host actions). Thanks for feedback, unleashing the PR.

@0penBrain 0penBrain marked this pull request as ready for review January 21, 2022 17:11
@freecadci
Copy link

pipeline status for feature branch PR_5404. Pipeline 454039962 was triggered at b2d09bf. All CI branches and pipelines.

@wwmayer wwmayer merged commit fc269c6 into FreeCAD:master Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants