Opened 12 years ago

Closed 7 years ago

#475 closed defect (fixed)

Activities need a way to disable Esc to exit fullscreen.

Reported by: wadeb Owned by: wadeb
Priority: Normal Milestone:
Component: design Version: Git as of bugdate
Severity: Minor Keywords:
Cc: Distribution/OS: Unspecified
Bug Status: New

Description

Currently sugar.graphics.Window intercepts key presses in order to check for Tray hiding (Alt+Space) and to exit Fullscreen mode (Esc).

First, I argue that Esc is not needed since a) Alt Enter already works and b) An icon is present in the corner. No matter which way the user got into fullscreen mode - icon or hotkey - the same action will get them out.

Second, Terminal based activities need a way to disable this behavior as Esc is a commonly used hotkey in programs like VIM. Since this is not enabled by a standard accelerator, there is no way to turn it off, short of intercepting key presses and not letting them pass through.

Change History (5)

comment:1 Changed 12 years ago by erikos

  • Bug Status changed from Unconfimed to New
  • Component changed from sugar to design
  • Milestone Unspecified by Release Team deleted
  • Owner changed from tomeu to eben

Eben can you comment?

comment:2 Changed 12 years ago by eben

  • Owner changed from eben to tomeu
  • Status changed from new to assigned

I don't think alt-enter is a good argument for not binding esc, myself. It's rather obscure, and the esc key maps semantically to the desired action while alt-enter clearly does not.

That said, I understand the complications with activities like Terminal (it may, in truth, be the only one; are there other examples?) The Cocoa/OSX way to handle this type of thing would be to have a esc_key_exits_fullscreen method defined in the activity class, which would return true by default. Activities could override this method and return false (always, or contextually), and Sugar would check with the activity by calling this method when intercepting the esc key event to ensure proper behavior.

comment:3 Changed 12 years ago by wadeb

My point regarding Alt-Enter is not that it's obvious, but that it's how the user got into fullscreen mode in the first place. If the user doesn't realize that they accidentally pressed Alt-Enter, there is still the icon in the corner.

comment:6 Changed 12 years ago by wadeb

  • Owner changed from tomeu to wadeb
  • Status changed from assigned to accepted

comment:5 Changed 7 years ago by Emil Dudev

  • Resolution set to fixed
  • Status changed from accepted to closed

Touch UI: esc fullscreen

This patch moves sugar3.graphics.Window key-press-event handling.
It will now be after any other event handling from deived classes.
Fixes #475

Changeset: c0319389e84c8fe142bc762a892b1b7af2347f7a

Note: See TracTickets for help on using tickets.