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

Add accelerators for control panel open and close #497

Closed
wants to merge 1 commit into from

Conversation

quozl
Copy link
Contributor

@quozl quozl commented May 5, 2015

There is no accelerator for opening or closing control panel. This hinders use, requiring mouse or touchscreen. See #4660.

View Source has Alt+Shift+V for open, and Escape for close. Activities have Ctrl+q for close. Wireless Key Required dialog has Escape for close.

Patch adds accelerators:

  1. Alt+Shift+M to open control panel, valid in any Sugar screen or activity, and;
  2. Escape, Ctrl+q or Ctrl+Shift+q to close control panel or sections.

Close accelerator is added in the key event callback, rather than using ToolButton accelerators, because they do not work in the control panel.

Test case: use Alt+Shift+M to open control panel, verify q alone, and Shift+Q do insert into search box, select a section, verify Ctrl+q, Ctrl+Shift+Q and Escape closes section, and closes control panel.

References:

There is no accelerator for opening or closing control panel.  This
hinders use, requiring mouse or touchscreen.  See #4660.

View Source has Alt+Shift+V for open, and Escape for close.  Activities
have Ctrl+q for close.  Wireless Key Required dialog has Escape for close.

Patch adds accelerators:

1.  Alt+Shift+M to open control panel, valid in any Sugar screen or
activity,

2.  Escape, Ctrl+q or Ctrl+Shift+q to close control panel or sections.

Close accelerator is added in the key event callback, rather than using
ToolButton accelerators, because they do not work in the control panel.

Test case: use "Alt+Shift+M" to open control panel, verify "q" alone,
and "Shift+Q" do insert into search box, select a section, verify
"Ctrl+q", "Ctrl+Shift+Q" and "Escape" closes section, and closes control
panel.

References:

http://wiki.sugarlabs.org/go/Hotkeys
http://bugs.sugarlabs.org/ticket/4660
sugarlabs#443
@samdroid-apps
Copy link
Contributor

Reviewed.

  1. This patch allows you to open many copies of the control panel. Pressing Alt-Shift-M should not open another panel if there is currently one open. Other shortcuts (view source tested) already deal for this edge case
  2. Esc is good and conststant, however other dialog (view source tested) do not use Ctrl-Q. Maybe only add Esc?

This is a very good patch otherwise!

Also, another easy target for the control panel: make enter do something on the grid view!

@godiard
Copy link
Contributor

godiard commented May 5, 2015

Just a comment: In src/jarabe/model/shell.py, we have a array self._shell_windows,
and two methods push_shell_window() and pop_shell_window() to track the windows opened,
and close them when needed.
Probably we should add a function has_shell_window() then we can control if a window is opened before opening one more.

@samdroid-apps
Copy link
Contributor

Or maybe only have 1 global instance of the control panel? Then you can only show and hide the window - and that is all you need!

@quozl quozl deleted the 2015-05-cp-hotkeys branch September 11, 2019 03:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants