Labs/Bespin/DesignDocs/Editor/KeyHandling: Difference between revisions

From MozillaWiki
< Labs‎ | Bespin‎ | DesignDocs
Jump to navigation Jump to search
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
How should we handle key handling? Here is a table to show the defaults including:
How should we handle key handling?


action, key combo by platform (Mac, Win, Linux), what other editors use for that action, does the browser use this event?
We have a detailed spreadsheet sharing the key combination for Bespin on various OSes and browsers.


{| cellspacing="10"
We also show the browser shortcuts and if there are collisions on other sheets:
|+Key Handling
 
|-
[http://tr.im/bespinkeys Bespin Key Spreadsheet]
! Action !! Mac !! Win !! Linux !! Other Editors !! Browser usage
 
|-
The core philosophies of key bindings in Bespin are:
! Up Cursor
 
| x || x || x || x || x
* We should have smart defaults that "feel right" for developers on each platform
|-
** E.g. Redo on Windows is commonly Ctrl+Y, on Mac Cmd+Shift+Z
! Down Cursor
* We should block or override key combinations that make sense in the browser, but let through ones that a user expects, for example:
| x || x || x || x || x
** Cmd+F should do a find internally, Cmd+Arrow Down should go to the end of a file
|-
** Cmd+~ (tilde) should go through to the browser and find another browser window if applicable
! Left Cursor
* Users should be able to rebind their keys
| x || x || x || x || x
** We have "bindkey" but need a nice graphical view
|-
** Need the option to override the default, or keep it (right now we keep the default)
! Right Cursor
** We should give people an easy way to get keybindings from emacs, vi, textmate etc.
| x || x || x || x || x
|-
! Up Paragraph
| x || x || x || x || x
|-
! Down Paragraph
| x || x || x || x || x
|-
! Start of Line
| x || x || x || x || x
|-
! End of Line
| x || x || x || x || x
|-
! Start of page
| x || x || x || x || x
|-
! End of page
| x || x || x || x || x
|-
! Back word
| x || x || x || x || x
|-
! Forward word
| x || x || x || x || x
|-
! Copy selection
| x || x || x || x || x
|-
! Cut selection
| x || x || x || x || x
|-
! Paste selection
| x || x || x || x || x
|-
! Kill to line end
| x || x || x || x || x
|-
! Kill entire line
| x || x || x || x || x
|-
! Go to line
| x || x || x || x || x
|-
! Go to function
| x || x || x || x || x
|-
! Center cursor vertically
| x || x || x || x || x
|-
! Newline
| x || x || x || x || x
|-
! New File
| x || x || x || x || x
|-
! Quick Open
| x || x || x || x || x
|-
! Find
| x || x || x || x || x
|-
! Find Next
| x || x || x || x || x
|-
! Find Previous
| x || x || x || x || x
|-
! Save
| x || x || x || x || x
|-
! Upper case selection
| x || x || x || x || x
|-
! Lower case selection
| x || x || x || x || x
|-
! Undo
| x || x || x || x || x
|-
! Redo
| x || x || x || x || x
|-
! Select All
| x || x || x || x || x
|-
! Indent
| x || x || x || x || x
|-
! Insert tab
| x || x || x || x || x
|-
! Unindent
| x || x || x || x || x
|-
! Delete character before
| x || x || x || x || x
|-
! Delete character after
| x || x || x || x || x
|-
! Delete word to left
| x || x || x || x || x
|-
! Delete word to right
| x || x || x || x || x
|-
|}

Latest revision as of 07:39, 17 June 2009

How should we handle key handling?

We have a detailed spreadsheet sharing the key combination for Bespin on various OSes and browsers.

We also show the browser shortcuts and if there are collisions on other sheets:

Bespin Key Spreadsheet

The core philosophies of key bindings in Bespin are:

  • We should have smart defaults that "feel right" for developers on each platform
    • E.g. Redo on Windows is commonly Ctrl+Y, on Mac Cmd+Shift+Z
  • We should block or override key combinations that make sense in the browser, but let through ones that a user expects, for example:
    • Cmd+F should do a find internally, Cmd+Arrow Down should go to the end of a file
    • Cmd+~ (tilde) should go through to the browser and find another browser window if applicable
  • Users should be able to rebind their keys
    • We have "bindkey" but need a nice graphical view
    • Need the option to override the default, or keep it (right now we keep the default)
    • We should give people an easy way to get keybindings from emacs, vi, textmate etc.