Audacity Bug Summary
••• Introduction •••
••• Keywords •••
    Audacity 3.0.3 development began 19th April 2021

Audacity Bugzilla



Bug 712 - Keyboard preferences hotkey search - entering multiple keys
Keyboard preferences hotkey search - entering multiple keys
Status: RESOLVED FIXED
Product: Audacity
Classification: Unclassified
Component: User Interface
2.0.6
PC All
: P4 Repeatable
Assigned To: Default Assignee for New Bugs
: patch_closed
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-26 09:15 UTC by David Bailes
Modified: 2018-08-20 11:51 UTC (History)
5 users (show)

See Also:
Steps To Reproduce:
If keyboard preferences opens with the view set to view by key, then in the text box for searching you can enter multiple keystrokes (and the text box is mislabelled search).
Release Note:
First Git SHA:
Group: ---
Workaround:
Closed: 2018-08-20 00:00:00


Attachments
patch (1.03 KB, application/octet-stream)
2014-03-26 09:16 UTC, David Bailes
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Bailes 2014-03-26 09:15:08 UTC
If keyboard preferences opens with the view set to view by key, then in the text box for searching you can enter multiple keystrokes (and the text box is mislabelled search). In all other situations you can only enter one keystroke, and this is the intended behaviour.
A patch to fix this is attached.
Comment 1 David Bailes 2014-03-26 09:16:19 UTC
Created attachment 471 [details]
patch
Comment 2 David Bailes 2014-08-07 07:03:51 UTC
Just to amplify the misbehaviour of text box for searching in this case:
- you can enter multiple single letters
- if you include the ctrl modifier nothing is entered
- if you include the shift modifier, a capital letter is entered, rather than "shift + letter", and so the results are incorrect.
Comment 3 Gale Andrews 2014-08-08 15:52:00 UTC
Thanks, David. It tests fine for me on Win, Mac and Linux, so patch_ready. Sorry it wasn't noticed before.  

I did test but it doesn't fix bug 682 (P2).
Comment 4 Vaughan Johnson 2014-08-12 18:34:20 UTC
(In reply to comment #3)

I applied part of this patch (revision: 13291): 

* KeyConfigPrefs::Populate(): I don't see good reason to test for ViewByKey a second time, after the 

   mView->SetView(mViewType); 

call, so I moved that into the clause that sets mViewType for ViewByKey. More concise, more readable. 


* Not obvious to me why it's okay to remove the 

   if (mViewType == ViewByKey) {
      mFilterLabel->SetLabel(_("&Hotkey:"));
   }

near the bottom of KeyConfigPrefs::PopulateOrExchange(ShuttleGui & S). Didn't see it from a code scan, but if you let me know why it's okay, I'll do that, too.
Comment 5 Gale Andrews 2014-08-13 01:43:50 UTC
I built the committed patch OK on all three OS'es but on more testing, don't we want the modified letter typed to only return that letter when searching in Hotkey?

For example SHIFT + U includes SHIFT + UP in the results and SHIFT + L (which doesn't exist by default) returns results including SHIFT + LEFT. That seems a little counter-intuitive to me.
Comment 6 David Bailes 2014-08-13 05:07:34 UTC
(In reply to comment #4)
> (In reply to comment #3)

> * Not obvious to me why it's okay to remove the 
> 
>    if (mViewType == ViewByKey) {
>       mFilterLabel->SetLabel(_("&Hotkey:"));
>    }
> 
> near the bottom of KeyConfigPrefs::PopulateOrExchange(ShuttleGui & S). Didn't
> see it from a code scan, but if you let me know why it's okay, I'll do that,
> too.

The label only needs to be set after mViewType is initialized, or changed, which it is in KeyConfigPrefs::Populate and KeyConfigPrefs::OnViewBy.
In addition, when KeyConfigPrefs::PopulateOrExchange is called from KeyConfigPrefs::Populate, mViewType has not been initialized. So the above code should be removed from PopulateOrExchange.
Comment 7 David Bailes 2014-08-13 07:20:02 UTC
(In reply to comment #5)
> I built the committed patch OK on all three OS'es but on more testing, don't we
> want the modified letter typed to only return that letter when searching in
> Hotkey?
> 
> For example SHIFT + U includes SHIFT + UP in the results and SHIFT + L (which
> doesn't exist by default) returns results including SHIFT + LEFT. That seems a
> little counter-intuitive to me.

I agree, it's still not quite right (but not directly related to this bug). I think the fix for bug 710 could be generalized to fix the above example.
Comment 8 Gale Andrews 2014-08-13 16:02:20 UTC
(In reply to comment #7)
>> For example SHIFT + U includes SHIFT + UP in the results and SHIFT + L 
>> which doesn't exist by default) returns results including SHIFT + LEFT. 
>> That seems a little counter-intuitive to me.
> I agree, it's still not quite right (but not directly related to this bug).
> I think the fix for bug 710 could be generalized to fix the above example.
OK David, so if you think it best, please RESOLVE-FIX this bug (I've no other issues with it), then start a new bug for the above problem.


Gale
Comment 9 Vaughan Johnson 2014-08-13 17:13:26 UTC
(In reply to comment #6)

Thanks, David. Sounds right. Exactly the kind of explanation I was looking for, without requiring my time to review the full code. 

Committed at revision 13292.
Comment 10 David Bailes 2014-08-14 06:45:34 UTC
(In reply to comment #8)
> (In reply to comment #7)
> >> For example SHIFT + U includes SHIFT + UP in the results and SHIFT + L 
> >> which doesn't exist by default) returns results including SHIFT + LEFT. 
> >> That seems a little counter-intuitive to me.
> > I agree, it's still not quite right (but not directly related to this bug).
> > I think the fix for bug 710 could be generalized to fix the above example.
> OK David, so if you think it best, please RESOLVE-FIX this bug (I've no other
> issues with it), then start a new bug for the above problem.

Opened bug 744.