FreeCAD / FreeCAD

This is the official source code of FreeCAD, a free and opensource multiplatform 3D parametric modeler.
https://www.freecad.org
Other
19.55k stars 4.02k forks source link

[Problem] Draft: task panel, checkbox and buttons can't be interacted with using keyboard #10510

Open benj5378 opened 1 year ago

benj5378 commented 1 year ago

Is there an existing issue for this?

Problem description

Using enter key while having selected a button (with tab key) should be equivalent to clicking the button. Using space key while having selected a checkbox (with tab key) should be equivalent to clicking the checkbox.

But neither enter or space keys work on buttons or checkboxes inside the task panel. Instead using space hides the object selected in the hierarchy (even though it hierachy isn't selected)?

So far, this seems only seems to affect task panels in Draft

Full version info

OS: Fedora Linux 38 (KDE Plasma) (KDE/plasmax11)
Word size of FreeCAD: 64-bit
Version: 0.21.0.33675 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 0.21.0)
Hash: 41b058e2087de60dc8fef3d3e68c7d0129e13abf
Python 3.10.12, Qt 5.15.8, Coin 4.0.0, Vtk 9.2.5, OCC 7.6.3
Locale: English/United States (en_US)
Installed mods: 
  * Assembly4.backup1691951820.225657 0.50.2
  * Assembly4
  * Behave-Dark-Colors 0.1.1
  * Curves 0.6.13
  * DynamicData 2.46.0
  * fasteners 0.4.59
  * Freecad-Built-in-themes-beta 1.2.2
  * freecad.gears.backup1692223246.5590403 1.0.0
  * freecad.gears
  * ExtremeProLight 1.6.0
  * A2plus 0.4.60n
  * ExplodedAssembly
  * FreeCAD_DarkPreferencePAck 0.0.1
  * Glass
  * kicadStepUpMod 10.19.4
  * Silk 0.1.4
  * lattice2 1.0.0
  * Manipulator 1.5.0

Subproject(s) affected?

Draft

Anything else?

No response

Code of Conduct

benj5378 commented 1 year ago

Confirmed by @qewer33

yorikvanhavre commented 1 year ago

I guess we need to handle these key events at button or checkbox level otherwise they are passed upwards...

benj5378 commented 1 year ago

@yorikvanhavre any ideas why this only seems to affect Draft Workbench?

yorikvanhavre commented 1 year ago

I have no idea.. Thought maybe some of the Draft widgets might be swallowing key events, but it's not the case. I'll investigate more...

luzpaz commented 1 year ago

This also falls in to the 'accessibility' category

luzpaz commented 1 year ago

@Roy-043 when you get a chance, would you mind weighing-in?

Roy-043 commented 1 year ago

In my tests on Windows and Linux toggles and buttons on Draft task panels can be accessed via the keyboard.

I have used Draft_Line and Draft_ShapeString in my tests.

Space works for toggles. Enter or Space works for buttons (Draft_ShapeString) or only Space (Draft_Line).

Steps:

  1. Start FreeCAD.
  2. Start a new document.
  3. Switch to the Draft WB.
  4. Call one of the mentioned commands.
  5. Click in the X inputbox.
  6. Press Shift+Tab twice. The Cancel button has the focus now.
  7. Press Enter or Space.
OS: Windows 8 build 9600
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.34387 (Git)
Build type: Release
Branch: master
Hash: d95b26dfb5dd23eaee004b4af3cf5cf4766e7f9c
Python 3.10.12, Qt 5.15.8, Coin 4.0.0, Vtk 9.2.5, OCC 7.6.3
Locale: Dutch/Netherlands (nl_NL)
Installed mods:
OS: Ubuntu 22.04.3 LTS (ubuntu:GNOME/ubuntu)
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.33719 (Git)
Build type: Release
Branch: master
Hash: 2a88c7c7dfed699d2a4944bda13bf8626ed39315
Python 3.10.12, Qt 5.15.8, Coin 4.0.0, Vtk 9.2.5, OCC 7.6.3
Locale: Dutch/Netherlands (nl_NL)