特殊:Badtitle/NS100:KeyboardShortcuts:修订间差异

来自Ubuntu中文
跳到导航跳到搜索
Oneleaf留言 | 贡献
新页面: {{From|https://help.ubuntu.com/community/KeyboardShortcuts}} {{Languages|UbuntuHelp:KeyboardShortcuts}} #title Keyboard Shortcuts As well as using your mouse to operate software, you ca...
 
Wikibot留言 | 贡献
无编辑摘要
 
(未显示同一用户的8个中间版本)
第2行: 第2行:
{{Languages|UbuntuHelp:KeyboardShortcuts}}
{{Languages|UbuntuHelp:KeyboardShortcuts}}
#title Keyboard Shortcuts
#title Keyboard Shortcuts
As well as using your mouse to operate software, you can also use your keyboard to perform specific functions. This page provides a list of '''keyboard shortcuts''' which you may find useful.
As well as using your mouse to operate software, you can also use your keyboard to perform specific functions. This page provides a list of '''keyboard shortcuts''' which you may find useful.
=== How to use a keyboard shortcut ===
=== How to use a keyboard shortcut ===
Traditionally, keyboard shortcuts are written like so: '''Alt + F1'''. This means that you should press the '''Alt''' and '''F1''' keys simultaneously. This is normally best achieved by holding down the ''modifier'' key (such as Ctrl or Alt) and then pressing the second key once. You can then release the modifier key.
Traditionally, keyboard shortcuts are written like so: '''Alt + F1'''. This means that you should press the '''Alt''' and '''F1''' keys simultaneously. This is normally best achieved by holding down the ''modifier'' key (such as Ctrl or Alt) and then pressing the second key once. You can then release the modifier key.
 
=== Finding keyboard shortcuts ===
=== Finding application-specific keyboard shortcuts ===
==== Finding system keyboard shortcuts ====
 
To find (and change) system-level keyboard shortcuts, one can (at least in later, GNOME-based distros, e.g. ubuntu karmic) run the '''Keyboard Shortcuts''' applet, e.g. via System>Preferences>Keyboard Shortcuts on the main menu.
==== Finding application-specific keyboard shortcuts ====
While there are many standard keyboard shortcuts (see below), most applications also have keyboard shortcuts which are specific to themselves. These can normally be found in the pull-down menus at the top of the application's screen. The example below shows a menu in ''Open''''''Office.org Writer'', with the keyboard shortcuts highlighted:
While there are many standard keyboard shortcuts (see below), most applications also have keyboard shortcuts which are specific to themselves. These can normally be found in the pull-down menus at the top of the application's screen. The example below shows a menu in ''Open''''''Office.org Writer'', with the keyboard shortcuts highlighted:
https://help.ubuntu.com/community/KeyboardShortcuts?action=AttachFile&do=get&target=shortcut-menu.png
https://help.ubuntu.com/community/KeyboardShortcuts?action=AttachFile&do=get&target=shortcut-menu.png
=== Desktop shortcuts ===
=== Desktop shortcuts ===
This section lists common keyboard shortcuts which you can use to operate parts of the desktop (such as windows and the menu bar).
This section lists common keyboard shortcuts which you can use to operate parts of the desktop (such as windows and the menu bar).
{|border="1" cellspacing="0"
{|border="1" cellspacing="0"
| '''Alt + F1''' || Open the ''Applications'' menu  
| '''Alt + F1''' || Open the ''Applications'' menu  
第29行: 第22行:
| '''Alt + Prt Sc''' || Take a screenshot of the current window  
| '''Alt + Prt Sc''' || Take a screenshot of the current window  
|}
|}
==== Window shortcuts ====
==== Window shortcuts ====
'''Alt + Tab''' - Switch between currently-open windows. Press '''Alt + Tab''' and then release '''Tab''' (but continue to hold '''Alt'''). Press '''Tab''' repeatedly to cycle through the list of available windows which appears on the screen. Release the '''Alt''' key to switch to the selected window.
'''Alt + Tab''' - Switch between currently-open windows. Press '''Alt + Tab''' and then release '''Tab''' (but continue to hold '''Alt'''). Press '''Tab''' repeatedly to cycle through the list of available windows which appears on the screen. Release the '''Alt''' key to switch to the selected window.
'''Ctrl + Alt + Left/Right Cursor''' - Lets you quickly switch between your Workspaces.
'''Ctrl + Alt + Left/Right Cursor''' - Lets you quickly switch between your Workspaces.
 
These might not work on every machine, but are reasonably common:
'''Alt+F7'''  Moves the current window (can be moved with mouse or keyboard).
'''Alt+F8''' Resizes current window (again,can be moved with mouse or keyboard).
'''Alt+F9''' Minimises current window.
'''Alt+F10''' Maximises current window.
'''Alt+Space''' Brings up  window menu with with 'Always on Top' and 'Minimise' and 'Maximise' and above commands.
These might change depending on the application you're using, but work for most common applications:
'''Alt+F5''' Returns window to 'normal' or previous size.
'''Alt+F4''' Closes window.
=== Desktop Effects enabled shortcuts ===
=== Desktop Effects enabled shortcuts ===
All of the shortcuts listed in this section require [[UbuntuHelp:DesktopEffects|Desktop Effects]] to be enabled.
All of the shortcuts listed in this section require [[UbuntuHelp:DesktopEffects|Desktop Effects]] to be enabled.
{|border="1" cellspacing="0"
{|border="1" cellspacing="0"
| '''Ctrl + Alt + Left/Right Cursor''' || Spins the 'cube' that your workspaces reside on, allowing you to select the workspace you wish to use.  
| '''Ctrl + Alt + Left/Right Cursor''' || Spins the 'cube' that your workspaces reside on, allowing you to select the workspace you wish to use.  
第46行: 第42行:
|-
|-
| '''Ctrl + Alt + Down Cursor''' || Unfolds your workspace cube allowing you to see more than one of your workspaces at once, using the left and right cursor keys with this active will allow you to select the workspace you wish to use.  
| '''Ctrl + Alt + Down Cursor''' || Unfolds your workspace cube allowing you to see more than one of your workspaces at once, using the left and right cursor keys with this active will allow you to select the workspace you wish to use.  
|-
| '''Ctrl + Alt + Tab''' || Switch between currently-open windows across all workspaces.
|-
| '''Super + W''' || Enables the 'scale' effect, it shows all windows from the current workspace.
|-
| '''Super + A''' || Enables the 'scale' effect, it shows all windows from all workspaces.
|-
| '''Super + M''' || Invert colours of the focused window.
|-
| '''Super + N''' || Invert colours for the whole screen.
|-
| '''Super + Mouse Scroll Wheel''' || Zooms in on the screen.
|-
| '''Super + Middle Mouse Button''' || Select a region to zoom into, using a rectangle.
|-
| '''Ctrl + Alt + D''' || Toggles 'Show Desktop'.
|-
| '''Alt + Middle Mouse Button''' || Resize focused window.
|-
| '''Alt + Left Mouse Button''' || Move focused window.
|-
| '''Alt + Right Mouse Button''' || Show window menu.
|}
|}
=== Common application shortcuts ===
=== Common application shortcuts ===
These shortcuts do not apply in all applications, but usually perform the functions listed below.
These shortcuts do not apply in all applications, but usually perform the functions listed below.
{|border="1" cellspacing="0"
{|border="1" cellspacing="0"
| '''Ctrl + C''' || Copy the selected text/object  
| '''Ctrl + C''' || Copy the selected text/object  
第79行: 第94行:
| '''Ctrl + Shift + Z''' || Redo a change that you just undid  
| '''Ctrl + Shift + Z''' || Redo a change that you just undid  
|}
|}
=== System shortcuts ===
=== System shortcuts ===
Some of these shortcuts will restart important parts of your system. Only use them if you have to.
Some of these shortcuts will restart important parts of your system. Only use them if you have to.
{|border="1" cellspacing="0"
{|border="1" cellspacing="0"
| '''Ctrl + Alt + Delete''' || Restart the computer immediately, without saving open files  
| '''Ctrl + Alt + Delete''' || Restart the computer immediately, without saving open files  
|-
| '''Ctrl + Alt + Backspace''' || Restart X (the display manager) and display the login screen
|-
|-
| '''Ctrl + Alt + Plus (numeric keypad)''' || Rotate through supported screen resolutions  
| '''Ctrl + Alt + Plus (numeric keypad)''' || Rotate through supported screen resolutions  
第93行: 第103行:
| '''Ctrl + Alt + Minus (numeric keypad)''' || Rotate backwards through supported screen resolutions  
| '''Ctrl + Alt + Minus (numeric keypad)''' || Rotate backwards through supported screen resolutions  
|}
|}
A list of [http://en.wikipedia.org/wiki/Magic_SysRq_key low-level keyboard shortcuts] is available on Wikipedia.
A list of [http://en.wikipedia.org/wiki/Magic_SysRq_key low-level keyboard shortcuts] is available on Wikipedia.
=== Application-specific shortcuts ===
=== Application-specific shortcuts ===
This section covers common keyboard shortcuts for some important applications which are installed by default in Ubuntu.
This section covers common keyboard shortcuts for some important applications which are installed by default in Ubuntu.
==== Firefox Web Browser ====
==== Firefox Web Browser ====
{|border="1" cellspacing="0"
{|border="1" cellspacing="0"
| '''Ctrl + T''' || Open a new tab  
| '''Ctrl + T''' || Open a new tab  
第127行: 第132行:
| '''Ctrl + R''' || Reload the current page  
| '''Ctrl + R''' || Reload the current page  
|}
|}
 
These might not work for everyone, but can help with accessibility issues:
'''Alt Gr+Space''' Scrolls current tab/window down.
'''Alt Gr+Backspace''' Scrolls current tab/window up.
You may find '''Alt Gr+Shift+Space''' works if Alt Gr+Backspace does not.
If you don't have Alt Gr, it might be labelled something else. It's usually to the right of the space bar.
See [http://www.mozilla.org/support/firefox/keyboard Firefox Help] for a full list of keyboard shortcuts.
See [http://www.mozilla.org/support/firefox/keyboard Firefox Help] for a full list of keyboard shortcuts.
==== OpenOffice.org Writer ====
==== OpenOffice.org Writer ====
{|border="1" cellspacing="0"
{|border="1" cellspacing="0"
| '''F7''' || Check the spelling of the current document  
| '''F7''' || Check the spelling of the current document  
第149行: 第156行:
| '''Ctrl + Shift + J''' || Show the current document full-screen  
| '''Ctrl + Shift + J''' || Show the current document full-screen  
|}
|}
Press '''Tools''' -> '''Customize...''' -> '''Keyboard''' to change keyboard shortcuts in ''Open''''''Office''.
Press '''Tools''' -> '''Customize...''' -> '''Keyboard''' to change keyboard shortcuts in ''Open''''''Office''.
=== Laptop Function Shortcuts ===
=== Laptop Function Shortcuts ===
Many laptops have function ('''Fn''') keys which you can hold down to access more functions on the laptop's keyboard. A list of these functions should be available from the manufacturer of the laptop.
Many laptops have function ('''Fn''') keys which you can hold down to access more functions on the laptop's keyboard. A list of these functions should be available from the manufacturer of the laptop.
=== Text Entry Shortcuts ===
If you want to have quick access to lines of text by using a hotkey, for example to enter your email address in forms, then you can use xbindkeys. Xbindkeys has a GUI utility to allow easy settings of hotkeys, but be aware that it's a little more complicated than the default Ubuntu Shortcutkeys interface.
Install xbindkeys 
<pre><nowiki>
sudo apt-get install xbindkeys
</nowiki></pre>
Create the default config file for xbindkeys
<pre><nowiki>
xbindkeys --defaults > /home/your-user-name/.xbindkeysrc
</nowiki></pre>
When thats done, install xbindkeys-config, the GUI for xbindkeys
<pre><nowiki>
sudo apt-get install xbindkeys-config
</nowiki></pre>
Now the utility the actually does the "typing"
<pre><nowiki>
sudo apt-get install xvkbd
</nowiki></pre>
Once each is installed, start both applications by bringing up "Run Application" with ALT -F2.
<pre><nowiki>
xbindkeys
</nowiki></pre>and
<pre><nowiki>
xbindkeys-config
</nowiki></pre>
To keep the xbindkeys hotkeys active when you next start the computer you will have to add a new session, System --> Preferences --> Sessions. Put in the command "xbindkeys" into the command field (without the quotes).
You should be able to see the "Xbindkeys Config" window. Start a new hotkey. Hit "New" on the bottom row of buttons. Then use the edit area at the top right. Give the hotkey a name. Hit the "GetKey" button to set the keypress for a hotkey. Some hotkeys may conflict with other hotkeys on the system (a window will open or a compiz plugin will activate). If this happens then choose another combination like CTRL - ALT - F for example.
Now put the command to activate with that hotkey in the "Action" field. This can be anything, but to allow for the entry of a line of text into part of the GUI enter
<pre><nowiki>
xvkbd -xsendevent -text "[email protected]"
</nowiki></pre>
The example shows an email address but it can be any line of text. Now hit "Apply" and test the hotkey in a Firefox field, text editor, or anywhere that text can be entered. Please note that using "Run Action" will not be able to test the command in xbindkeys-config, you will have to test it somewhere else.
==== Replacing keys with other keys ====
If you want to use xbindkeys to override certain keys on your keyboard, you can catch them with xbindkeys, and then emit new keypresses using xmacro. To install xmacro, use:
<pre><nowiki>
sudo apt-get install xmacro
</nowiki></pre>
After this, you can find out the commands for specific keypresses by starting xmacrorec:
<pre><nowiki>
xmacrorec :0.0
</nowiki></pre>
First give it the key which will allow you to quit the app, then press the keys you want to know the codes for. After this, you can use those codes in the commands you tell xbindkeys to run, for example:
<pre><nowiki>
xmacroplay-keys :0.0 KeyStr Next
</nowiki></pre>
will simulate a key press of the PageDown key. Thus, in my .xbindkeysrc the following contents
<pre><nowiki>
"xmacroplay-keys :0.0 KeyStr Prior"
  XF86Back


"xmacroplay-keys :0.0 KeyStr Next"
  XF86Forward
</nowiki></pre>
will turn the Backward/Forward buttons on my Thinkpad T41 into PageDown and PageUp keys, and will no longer disturb my browsing as I accidentally press those Backward/Forward while browsing.
=== More information ===
=== More information ===
* A [http://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts table of keyboard shortcuts] is available on Wikipedia
* A [http://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts table of keyboard shortcuts] is available on Wikipedia
* A list of [http://www.tuxfiles.org/linuxhelp/shortcuts.html Linux keyboard shortcuts] is available at tuxfiles.org
* A list of [http://www.tuxfiles.org/linuxhelp/shortcuts.html Linux keyboard shortcuts] is available at tuxfiles.org


[[category:UbuntuHelp]]
[[category:UbuntuHelp]]

2010年5月19日 (三) 23:03的最新版本

{{#ifexist: :KeyboardShortcuts/zh | | {{#ifexist: KeyboardShortcuts/zh | | {{#ifeq: {{#titleparts:KeyboardShortcuts|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:KeyboardShortcuts|1|-1|}} | zh | | }}

  1. title Keyboard Shortcuts

As well as using your mouse to operate software, you can also use your keyboard to perform specific functions. This page provides a list of keyboard shortcuts which you may find useful.

How to use a keyboard shortcut

Traditionally, keyboard shortcuts are written like so: Alt + F1. This means that you should press the Alt and F1 keys simultaneously. This is normally best achieved by holding down the modifier key (such as Ctrl or Alt) and then pressing the second key once. You can then release the modifier key.

Finding keyboard shortcuts

Finding system keyboard shortcuts

To find (and change) system-level keyboard shortcuts, one can (at least in later, GNOME-based distros, e.g. ubuntu karmic) run the Keyboard Shortcuts applet, e.g. via System>Preferences>Keyboard Shortcuts on the main menu.

Finding application-specific keyboard shortcuts

While there are many standard keyboard shortcuts (see below), most applications also have keyboard shortcuts which are specific to themselves. These can normally be found in the pull-down menus at the top of the application's screen. The example below shows a menu in Open'Office.org Writer, with the keyboard shortcuts highlighted: KeyboardShortcuts?action=AttachFile&do=get&target=shortcut-menu.png

Desktop shortcuts

This section lists common keyboard shortcuts which you can use to operate parts of the desktop (such as windows and the menu bar).

Alt + F1 Open the Applications menu
Alt + F2 Run an application by typing its name in the box which appears
Prt Sc (Print Screen) Take a screenshot of the whole screen
Alt + Prt Sc Take a screenshot of the current window

Window shortcuts

Alt + Tab - Switch between currently-open windows. Press Alt + Tab and then release Tab (but continue to hold Alt). Press Tab repeatedly to cycle through the list of available windows which appears on the screen. Release the Alt key to switch to the selected window. Ctrl + Alt + Left/Right Cursor - Lets you quickly switch between your Workspaces. These might not work on every machine, but are reasonably common: Alt+F7 Moves the current window (can be moved with mouse or keyboard). Alt+F8 Resizes current window (again,can be moved with mouse or keyboard). Alt+F9 Minimises current window. Alt+F10 Maximises current window. Alt+Space Brings up window menu with with 'Always on Top' and 'Minimise' and 'Maximise' and above commands. These might change depending on the application you're using, but work for most common applications: Alt+F5 Returns window to 'normal' or previous size. Alt+F4 Closes window.

Desktop Effects enabled shortcuts

All of the shortcuts listed in this section require Desktop Effects to be enabled.

Ctrl + Alt + Left/Right Cursor Spins the 'cube' that your workspaces reside on, allowing you to select the workspace you wish to use.
Ctrl + Alt + Up Cursor Enables an 'expose' like feature that presents you with all the windows you currently have open, allowing you to select the one you wish to give focus to.
Ctrl + Alt + Down Cursor Unfolds your workspace cube allowing you to see more than one of your workspaces at once, using the left and right cursor keys with this active will allow you to select the workspace you wish to use.
Ctrl + Alt + Tab Switch between currently-open windows across all workspaces.
Super + W Enables the 'scale' effect, it shows all windows from the current workspace.
Super + A Enables the 'scale' effect, it shows all windows from all workspaces.
Super + M Invert colours of the focused window.
Super + N Invert colours for the whole screen.
Super + Mouse Scroll Wheel Zooms in on the screen.
Super + Middle Mouse Button Select a region to zoom into, using a rectangle.
Ctrl + Alt + D Toggles 'Show Desktop'.
Alt + Middle Mouse Button Resize focused window.
Alt + Left Mouse Button Move focused window.
Alt + Right Mouse Button Show window menu.

Common application shortcuts

These shortcuts do not apply in all applications, but usually perform the functions listed below.

Ctrl + C Copy the selected text/object
Ctrl + X Cut the selected text/object
Ctrl + V Paste/insert the selected text/object
Ctrl + A Select all text
Ctrl + B Make the selected text bold
Ctrl + I Make the selected text italic
Ctrl + U Underline the selected text
Ctrl + N Open a new document or window
Ctrl + S Save the current document
Ctrl + O Open another document
Ctrl + P Print the current document
Ctrl + Z Undo the last change you made
Ctrl + Shift + Z Redo a change that you just undid

System shortcuts

Some of these shortcuts will restart important parts of your system. Only use them if you have to.

Ctrl + Alt + Delete Restart the computer immediately, without saving open files
Ctrl + Alt + Plus (numeric keypad) Rotate through supported screen resolutions
Ctrl + Alt + Minus (numeric keypad) Rotate backwards through supported screen resolutions

A list of low-level keyboard shortcuts is available on Wikipedia.

Application-specific shortcuts

This section covers common keyboard shortcuts for some important applications which are installed by default in Ubuntu.

Firefox Web Browser

Ctrl + T Open a new tab
Ctrl + Tab Rotate through each tab
Ctrl + Shift + Tab Rotate backwards through each tab
Ctrl + W Close the current tab (or browser if on last tab)
Ctrl + L Enter a new web address
Ctrl + B Show a list of your bookmarks
Ctrl + H Show your browsing history
Ctrl + K Enter a new web search in the search bar
Ctrl + Y Show a list of downloaded files
F11 Display the current page full-screen
Esc Stop loading the current page
Ctrl + R Reload the current page

These might not work for everyone, but can help with accessibility issues: Alt Gr+Space Scrolls current tab/window down. Alt Gr+Backspace Scrolls current tab/window up. You may find Alt Gr+Shift+Space works if Alt Gr+Backspace does not. If you don't have Alt Gr, it might be labelled something else. It's usually to the right of the space bar. See Firefox Help for a full list of keyboard shortcuts.

OpenOffice.org Writer

F7 Check the spelling of the current document
Ctrl + F Find and replace words
Ctrl + Z Undo the last change
Ctrl + Y Redo a change which you just undid
Ctrl + L Align the current paragraph/selection to the left
Ctrl + E Align the current paragraph/selection to the center of the document
Ctrl + R Align the current paragraph/selection to the right
Ctrl + Shift + J Show the current document full-screen

Press Tools' -> Customize... -> Keyboard to change keyboard shortcuts in Open'Office.

Laptop Function Shortcuts

Many laptops have function (Fn) keys which you can hold down to access more functions on the laptop's keyboard. A list of these functions should be available from the manufacturer of the laptop.

Text Entry Shortcuts

If you want to have quick access to lines of text by using a hotkey, for example to enter your email address in forms, then you can use xbindkeys. Xbindkeys has a GUI utility to allow easy settings of hotkeys, but be aware that it's a little more complicated than the default Ubuntu Shortcutkeys interface. Install xbindkeys

sudo apt-get install xbindkeys

Create the default config file for xbindkeys

xbindkeys --defaults > /home/your-user-name/.xbindkeysrc

When thats done, install xbindkeys-config, the GUI for xbindkeys

sudo apt-get install xbindkeys-config

Now the utility the actually does the "typing"

sudo apt-get install xvkbd

Once each is installed, start both applications by bringing up "Run Application" with ALT -F2.

xbindkeys

and

xbindkeys-config

To keep the xbindkeys hotkeys active when you next start the computer you will have to add a new session, System --> Preferences --> Sessions. Put in the command "xbindkeys" into the command field (without the quotes). You should be able to see the "Xbindkeys Config" window. Start a new hotkey. Hit "New" on the bottom row of buttons. Then use the edit area at the top right. Give the hotkey a name. Hit the "GetKey" button to set the keypress for a hotkey. Some hotkeys may conflict with other hotkeys on the system (a window will open or a compiz plugin will activate). If this happens then choose another combination like CTRL - ALT - F for example. Now put the command to activate with that hotkey in the "Action" field. This can be anything, but to allow for the entry of a line of text into part of the GUI enter

xvkbd -xsendevent -text "[email protected]"

The example shows an email address but it can be any line of text. Now hit "Apply" and test the hotkey in a Firefox field, text editor, or anywhere that text can be entered. Please note that using "Run Action" will not be able to test the command in xbindkeys-config, you will have to test it somewhere else.

Replacing keys with other keys

If you want to use xbindkeys to override certain keys on your keyboard, you can catch them with xbindkeys, and then emit new keypresses using xmacro. To install xmacro, use:

sudo apt-get install xmacro

After this, you can find out the commands for specific keypresses by starting xmacrorec:

xmacrorec :0.0

First give it the key which will allow you to quit the app, then press the keys you want to know the codes for. After this, you can use those codes in the commands you tell xbindkeys to run, for example:

xmacroplay-keys :0.0 KeyStr Next

will simulate a key press of the PageDown key. Thus, in my .xbindkeysrc the following contents

"xmacroplay-keys :0.0 KeyStr Prior"
  XF86Back

"xmacroplay-keys :0.0 KeyStr Next"
  XF86Forward

will turn the Backward/Forward buttons on my Thinkpad T41 into PageDown and PageUp keys, and will no longer disturb my browsing as I accidentally press those Backward/Forward while browsing.

More information