Does keyboard focus return after opening a dialogue?

This section is now closed.
Forum rules
Audacity 1.3.x is now obsolete. Please use the current Audacity 2.1.x version.

Mac 0S X 10.3 and earlier are no longer supported but you can download legacy versions of Audacity for those systems HERE.
Locked
Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Does keyboard focus return after opening a dialogue?

Post by Gale Andrews » Thu Mar 03, 2011 12:46 am

There is a problem on Linux that if you open a dialogue such as when importing a file, the Audacity window focus is lost completely, so Space does not play the file, Also if you select a file on the Desktop or elsewhere (so removing focus from Audacity) then drag the file into Audacity and hit Space, the focus remains where you selected the file so Space executes the file there.

What should happen (and does on Windows) is that not only does the Audacity window get focus back after import, the focus returns to the correct part of the interface that previously had it (this still allows Space to Play or R to record).

So on Mac:

1 Click in one of the Selection Toolbar spinboxes which appears with a bold edge to show it has focus
2 Open Preferences and click OK
3 Does the Selection Toolbar spinbox still have focus?

And if you select a file from your Desktop and drag it into Audacity, can you hit Space to play it in Audacity?


Thanks


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

billw58
Forum Staff
Posts: 5602
Joined: Wed Aug 12, 2009 2:10 am
Operating System: macOS 10.15 Catalina or later

Re: Does keyboard focus return after opening a dialogue?

Post by billw58 » Thu Mar 03, 2011 3:20 am

Gale Andrews wrote: 1 Click in one of the Selection Toolbar spinboxes which appears with a bold edge to show it has focus
2 Open Preferences and click OK
3 Does the Selection Toolbar spinbox still have focus?
In this case the spinbox loses focus, but spacebar continues to work for play/stop.

If instead I click Cancel in the Prefs dialog the spinbox retains focus.

If instead I select a spinbox then do Command-Shift-I to import a file, the file is imported and the spinbox retains focus. Spacebar still works for play/stop, and the up/down arrow keys change the spinbox.

Would you like a comprehensive list of which dialogs cause the spinbox to lose focus and which don't?
Gale Andrews wrote: And if you select a file from your Desktop and drag it into Audacity, can you hit Space to play it in Audacity?
Yes, but I think perhaps drag and drop may work differently on Mac than other platforms.

1) With the Audacity window in front and a Finder window showing the file to import visible beside it, one can click-hold-drag the file into the Audacity window. The Finder window is never brought to the front, so the Audacity window does not lose focus.

2) Same as above, but click in the Finder window to bring it to the front. Click-hold-drag the file onto the Audacity window. The Finder window remains in front. One must click in the Audacity window to bring it to the front. It then has focus and all is well.

3) In the Finder, drag a file onto the Audacity icon in the Dock. Audacity becomes the front application, opens a new project and imports the file.

This seems to be standard Mac drag and drop behaviour. That is, the drag and drop action does not bring the dragged-to application to the front. I tried this with Apple Mail and the behaviour is the same.

So it seems that Mac does not have the problem identified in the other post, or perhaps has a lesser variant of it. I have not been able to create a situation through the steps above that cause the spacebar to fail to work for play/stop.

I have had occasional problems with the spacebar failing to work for play/stop but have not been able to reproduce them. I'll watch for this in the future and report and reproducible scenarios.

-- Bill

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Does keyboard focus return after opening a dialogue?

Post by Gale Andrews » Fri Mar 04, 2011 10:53 am

billw58 wrote:
Gale Andrews wrote: 1 Click in one of the Selection Toolbar spinboxes which appears with a bold edge to show it has focus
2 Open Preferences and click OK
3 Does the Selection Toolbar spinbox still have focus?
In this case the spinbox loses focus, but spacebar continues to work for play/stop.

If instead I click Cancel in the Prefs dialog the spinbox retains focus.

If instead I select a spinbox then do Command-Shift-I to import a file, the file is imported and the spinbox retains focus. Spacebar still works for play/stop, and the up/down arrow keys change the spinbox.

Would you like a comprehensive list of which dialogs cause the spinbox to lose focus and which don't?
Thanks, Bill. If you could post to bug 294 which dialogues cause focus not to be returned to the correct element (and under what circumstances this happens), that would be helpful.

billw58 wrote:
Gale Andrews wrote: And if you select a file from your Desktop and drag it into Audacity, can you hit Space to play it in Audacity?
Yes, but I think perhaps drag and drop may work differently on Mac than other platforms.

1) With the Audacity window in front and a Finder window showing the file to import visible beside it, one can click-hold-drag the file into the Audacity window. The Finder window is never brought to the front, so the Audacity window does not lose focus.

2) Same as above, but click in the Finder window to bring it to the front. Click-hold-drag the file onto the Audacity window. The Finder window remains in front. One must click in the Audacity window to bring it to the front. It then has focus and all is well.

3) In the Finder, drag a file onto the Audacity icon in the Dock. Audacity becomes the front application, opens a new project and imports the file.
This seems to be standard Mac drag and drop behaviour. That is, the drag and drop action does not bring the dragged-to application to the front. I tried this with Apple Mail and the behaviour is the same.
OK. I've been persuaded that when you drag in on Linux , the dragged to application does not take focus. It seems very unfriendly to me, but we should respect the OS on Mac and Linux and not try to force focus.



Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

steve
Site Admin
Posts: 81653
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Does keyboard focus return after opening a dialogue?

Post by steve » Fri Mar 04, 2011 1:06 pm

I'm getting very confused by this topic being discussed
here: http://forum.audacityteam.org/viewtopic ... 17&t=54036
here: http://forum.audacityteam.org/viewtopic ... 18&t=49694
and here: http://bugzilla.audacityteam.org/show_bug.cgi?id=294

Wouldn't it be simpler to redirect all discussion on this issue to one common place?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Does keyboard focus return after opening a dialogue?

Post by Gale Andrews » Sat Mar 05, 2011 5:10 am

steve wrote:I'm getting very confused by this topic being discussed
here: http://forum.audacityteam.org/viewtopic ... 17&t=54036
here: http://forum.audacityteam.org/viewtopic ... 18&t=49694
and here: http://bugzilla.audacityteam.org/show_bug.cgi?id=294

Wouldn't it be simpler to redirect all discussion on this issue to one common place?
I had to start the Mac topic because Mac people were not reading the Linux topic or Bugziila.

As it's panning out I think the Forum postings are largely duplications and we should concentrate on Bugzilla.



Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Does keyboard focus return after opening a dialogue?

Post by Gale Andrews » Tue Mar 08, 2011 9:55 pm

Bill, thanks again for all that testing.

Leland's committed a fix for the major part of the problem on Linux that focus was completely lost after opening dialogues or new windows (http://bugzilla.audacityteam.org/show_bug.cgi?id=294). It should be in the Nightly Build coming up.

It should not affect Mac, but if you just want to confirm when known that everything is "as was", we can demote the residual issues to P5.



Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

Locked