diff --git a/docs/user/interface/Window.dox b/docs/user/interface/Window.dox
index cf0125fc64..a9f9890c28 100644
--- a/docs/user/interface/Window.dox
+++ b/docs/user/interface/Window.dox
@@ -399,6 +399,111 @@
from the screen without interrupting the message loop by calling Hide(). Other
message loop details such as locking and quitting are detailed in the BLooper
class.
+
+ BWindow has the following built-in shortcuts:
+
+
+
+ | Shortcut |
+ Action |
+ Handler |
+
+
+ | \key{Command}+\key{X} |
+ Cut |
+ Focus view |
+
+
+ | \key{Command}+\key{C} |
+ Copy |
+ Focus view |
+
+
+ | \key{Command}+\key{V} |
+ Paste |
+ Focus view |
+
+
+ | \key{Command}+\key{A} |
+ Select All |
+ Focus view |
+
+
+ | \key{Command}+\key{W} |
+ Close |
+ Window (if closable) |
+
+
+ | \key{Command}+\key{Q} |
+ Quit |
+ Application (non-modal windows only) |
+
+
+ | \key{Command}+\key{Control}+\key{M} |
+ Minimize |
+ Window (if minimizable) |
+
+
+ | \key{Command}+\key{Control}+\key{Z} |
+ Zoom |
+ Window (if zoomable) |
+
+
+ | \key{Command}+\key{Control}+\key{H} |
+ Hide |
+ Window |
+
+
+ | \key{Command}+\key{Control}+\key{F} |
+ Send to front |
+ Window |
+
+
+ | \key{Command}+\key{Control}+\key{B} |
+ Send behind |
+ Window |
+
+
+ | \key{Command}+\key{Control}+\key{←} |
+ Go to left workspace |
+ Desktop window |
+
+
+ | \key{Command}+\key{Control}+\key{→} |
+ Go to right workspace |
+ Desktop window |
+
+
+ | \key{Command}+\key{Control}+\key{↑} |
+ Go to above workspace |
+ Desktop window |
+
+
+ | \key{Command}+\key{Control}+\key{↓} |
+ Go to below workspace |
+ Desktop window |
+
+
+ | \key{Command}+\key{Control}+\key{Shift}+\key{←} |
+ Send window and go to left workspace |
+ Desktop window |
+
+
+ | \key{Command}+\key{Control}+\key{Shift}+\key{→} |
+ Send window and go to right workspace |
+ Desktop window |
+
+
+ | \key{Command}+\key{Control}+\key{Shift}+\key{↑} |
+ Send window and go to above workspace |
+ Desktop window |
+
+
+ | \key{Command}+\key{Control}+\key{Shift}+\key{↓} |
+ Send window and go to below workspace |
+ Desktop window |
+
+
*/
@@ -973,14 +1078,32 @@
*/
+/*!
+ \name Shortcut methods
+
+ The key parameter is specified in the form of a Unicode code point. This
+ is generally an ASCII character such as 'A' or a key constant such as
+ \c B_RIGHT_ARROW. To use a UTF-8 character you must first convert it to a
+ Unicode code point using BUnicodeChar::FromUTF8().
+*/
+
+
+//! @{
+
+
/*!
\fn void BWindow::AddShortcut(uint32 key, uint32 modifiers, BMenuItem* item)
- \brief Creates a keyboard shortcut that activates \a item.
+ \brief Creates a keyboard shortcut that activates a menu \a item.
\note This method was not available in BeOS R5.
- \param key The modifier key to set.
- \param modifiers Additional modifiers on top of \a B_COMMAND_KEY.
+ \param key The character that activates the shortcut, case-insensitive.
+ \param modifiers A bit mask of modifiers in addition to \c B_COMMAND_KEY,
+ options include:
+ - \c B_SHIFT_KEY
+ - \c B_OPTION_KEY
+ - \c B_CONTROL_KEY
+ - \c B_MENU_KEY
\param item The menu \a item to activate.
*/
@@ -989,9 +1112,18 @@
\fn void BWindow::AddShortcut(uint32 key, uint32 modifiers, BMessage* message)
\brief Creates a keyboard shortcut that sends a \a message to the window.
- \param key The modifier key to set.
- \param modifiers Additional modifiers on top of \a B_COMMAND_KEY.
- \param message The \a message to send when the shortcut is activated.
+ \warning Don't use this method to a create menu shortcut, add a BMenuItem
+ instead.
+
+ \param key The character that activates the shortcut, case-insensitive.
+ \param modifiers A bit mask of modifiers in addition to \c B_COMMAND_KEY,
+ options include:
+ - \c B_SHIFT_KEY
+ - \c B_OPTION_KEY
+ - \c B_CONTROL_KEY
+ - \c B_MENU_KEY
+ \param message The \a message to send when the shortcut is activated. The
+ BWindow takes ownership of the \a message.
*/
@@ -1001,9 +1133,18 @@
\brief Creates a keyboard shortcut that sends a \a message to the specified
\a target.
- \param key The modifier key to set.
- \param modifiers Additional modifiers on top of \a B_COMMAND_KEY.
- \param message The \a message to send when the shortcut is activated.
+ \warning Don't use this method to a create menu shortcut, add a BMenuItem
+ instead.
+
+ \param key The character that activates the shortcut, case-insensitive.
+ \param modifiers A bit mask of modifiers in addition to \c B_COMMAND_KEY,
+ options include one or more of the following:
+ - \c B_SHIFT_KEY
+ - \c B_OPTION_KEY
+ - \c B_CONTROL_KEY
+ - \c B_MENU_KEY
+ \param message The \a message to send when the shortcut is activated. The
+ BWindow takes ownership of the \a message.
\param target The handler to send the message to.
*/
@@ -1012,10 +1153,18 @@
\fn bool BWindow::HasShortcut(uint32 key, uint32 modifiers)
\brief Returns whether or not the specified shortcut is set on the window.
- \param key The modifier key to check.
- \param modifiers Additional modifiers on top of \a B_COMMAND_KEY to check.
+ \note This method was not available in BeOS R5.
- \returns \c true if the window has the specified shortcut, \c false otherwise.
+ \param key The character to check, case-insensitive.
+ \param modifiers A bit mask of modifiers in addition to \c B_COMMAND_KEY,
+ options include one or more of the following:
+ - \c B_SHIFT_KEY
+ - \c B_OPTION_KEY
+ - \c B_CONTROL_KEY
+ - \c B_MENU_KEY
+
+ \returns \c true if the window has the specified shortcut, \c false
+ otherwise.
*/
@@ -1023,11 +1172,21 @@
\fn void BWindow::RemoveShortcut(uint32 key, uint32 modifiers)
\brief Removes the specified shortcut from the window.
- \param key The modifier key.
- \param modifiers Additional modifiers on top of \a B_COMMAND_KEY.
+ The memory used by the shortcut message is freed.
+
+ \param key The character to remove, case-insensitive.
+ \param modifiers A bit mask of modifiers in addition to \c B_COMMAND_KEY,
+ options include one or more of the following:
+ - \c B_SHIFT_KEY
+ - \c B_OPTION_KEY
+ - \c B_CONTROL_KEY
+ - \c B_MENU_KEY
*/
+//! @}
+
+
/*!
\fn BButton* BWindow::DefaultButton() const
\brief Returns a pointer to the default button set on the window.