org.kde.koala
Class KStdAccel

java.lang.Object
  extended by org.kde.koala.KStdAccel

public class KStdAccel
extends java.lang.Object

\namespace KStdAccel Convenient methods for access to the common accelerator keys in the key configuration. These are the standard keybindings that should be used in all KDE applications. They will be configurable, so do not hardcode the default behavior. If you want real configurable keybindings in your applications, please checkout the class KAccel in kaccel.h

See Also:
KAccelShortcutList

Field Summary
static int AccelNone
          Defines the identifier of all standard accelerators.
static int AddBookmark
           
static int Back
           
static int BackwardWord
           
static int BeginningOfLine
           
static int Close
           
static int Copy
           
static int Cut
           
static int DeleteWordBack
           
static int DeleteWordForward
           
static int Deselect
           
static int End
           
static int EndOfLine
           
static int Find
           
static int FindNext
           
static int FindPrev
           
static int Forward
           
static int ForwardWord
           
static int FullScreen
           
static int GotoLine
           
static int Help
           
static int Home
           
static int New
           
static int Next
           
static int NextCompletion
           
static int Open
           
static int Paste
           
static int PasteSelection
           
static int PopupMenuContext
           
static int PrevCompletion
           
static int Print
           
static int Prior
           
static int Quit
           
static int Redo
           
static int Reload
           
static int Replace
           
static int RotateDown
           
static int RotateUp
           
static int Save
           
static int SelectAll
           
static int ShowMenubar
           
static int SubstringCompletion
           
static int TabNext
           
static int TabPrev
           
static int TextCompletion
           
static int Undo
           
static int Up
           
static int WhatsThis
           
static int WhatThis
           
static int ZoomIn
           
static int ZoomOut
           
 
Constructor Summary
KStdAccel()
           
 
Method Summary
static KShortcut addBookmark()
          Add current page to bookmarks.
static KShortcut back()
          Back.
static KShortcut backwardWord()
          BackwardWord.
static KShortcut beginningOfLine()
          Goto beginning of current line.
static KShortcut close()
          Close current document.
static KShortcut completion()
          Complete text in input widgets.
static KShortcut copy()
          Copy selected area into the clipboard.
static KShortcut cut()
          Cut selected area and store it in the clipboard.
static KShortcut deleteWordBack()
          Delete a word back from mouse/cursor position.
static KShortcut deleteWordForward()
          Delete a word forward from mouse/cursor position.
static KShortcut end()
          Goto end of the document.
static KShortcut endOfLine()
          Goto end of current line.
static KShortcut find()
          Find, search.
static KShortcut findNext()
          Find/search next.
static KShortcut findPrev()
          Find/search previous.
static int findStdAccel(KKeySequence keySeq)
          Return the StdAccel id of the standard accel action which uses this key sequence, or AccelNone if none of them do.
static KShortcut forward()
          Forward.
static KShortcut forwardWord()
          ForwardWord.
static KShortcut fullScreen()
          Full Screen Mode.
static KShortcut gotoLine()
          Go to line.
static KShortcut help()
          Help the user in the current situation.
static KShortcut home()
          Goto beginning of the document.
static java.lang.String label(int id)
          Returns a localized label for user-visible display.
static java.lang.String name(int id)
          Returns a unique name for the given accel.
static KShortcut next()
          Scroll down one page.
static KShortcut nextCompletion()
          Iterate through a list when completion returns multiple items.
static KShortcut open()
          Open file.
static KShortcut openNew()
          Create a new document (or whatever).
static KShortcut paste()
          Paste contents of clipboard at mouse/cursor position.
static KShortcut pasteSelection()
          Paste the selection at mouse/cursor position.
static KShortcut popupMenuContext()
          popup a context menu.
static KShortcut prevCompletion()
          Iterate through a list when completion returns multiple items.
static KShortcut print()
          Print current document.
static KShortcut prior()
          Scroll up one page.
static KShortcut quit()
          Quit the program.
static KShortcut redo()
          Redo.
static KShortcut reload()
          Reload.
static KShortcut replace()
          Find and replace matches.
static KShortcut rotateDown()
          Help users iterate through a list of entries.
static KShortcut rotateUp()
          Help users iterate through a list of entries.
static KShortcut save()
          Save current document.
static KShortcut selectAll()
          Reload.
static KShortcut shortcut(int id)
          Returns the keybinding for accel.
static KShortcut shortcutDefault(int id)
          Returns the hardcoded default shortcut for id. This does not take into account the user's configuration.
static KShortcut shortcutDefault3(int id)
          Returns the hardcoded default 3 modifier shortcut for id. This does not take into account the user's configuration.
static KShortcut shortcutDefault4(int id)
          Returns the hardcoded default 4 modifier shortcut for id. This does not take into account the user's configuration.
static KShortcut showMenubar()
          Show Menu Bar.
static KShortcut substringCompletion()
          Find a string within another string or list of strings.
static KShortcut tabNext()
          Next Tab.
static KShortcut tabPrev()
          Previous Tab.
static KShortcut undo()
          Undo last operation.
static KShortcut up()
          Up.
static KShortcut whatsThis()
          What's This button.
static java.lang.String whatsThis(int id)
          Returns an extended WhatsThis description for the given accelerator.
static KShortcut zoomIn()
          Zoom in.
static KShortcut zoomOut()
          Zoom out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AccelNone

public static final int AccelNone
Defines the identifier of all standard accelerators.

See Also:
Constant Field Values

Open

public static final int Open
See Also:
Constant Field Values

New

public static final int New
See Also:
Constant Field Values

Close

public static final int Close
See Also:
Constant Field Values

Save

public static final int Save
See Also:
Constant Field Values

Print

public static final int Print
See Also:
Constant Field Values

Quit

public static final int Quit
See Also:
Constant Field Values

Undo

public static final int Undo
See Also:
Constant Field Values

Redo

public static final int Redo
See Also:
Constant Field Values

Cut

public static final int Cut
See Also:
Constant Field Values

Copy

public static final int Copy
See Also:
Constant Field Values

Paste

public static final int Paste
See Also:
Constant Field Values

SelectAll

public static final int SelectAll
See Also:
Constant Field Values

Deselect

public static final int Deselect
See Also:
Constant Field Values

DeleteWordBack

public static final int DeleteWordBack
See Also:
Constant Field Values

DeleteWordForward

public static final int DeleteWordForward
See Also:
Constant Field Values

Find

public static final int Find
See Also:
Constant Field Values

FindNext

public static final int FindNext
See Also:
Constant Field Values

FindPrev

public static final int FindPrev
See Also:
Constant Field Values

Replace

public static final int Replace
See Also:
Constant Field Values

Home

public static final int Home
See Also:
Constant Field Values

End

public static final int End
See Also:
Constant Field Values

Prior

public static final int Prior
See Also:
Constant Field Values

Next

public static final int Next
See Also:
Constant Field Values

GotoLine

public static final int GotoLine
See Also:
Constant Field Values

AddBookmark

public static final int AddBookmark
See Also:
Constant Field Values

ZoomIn

public static final int ZoomIn
See Also:
Constant Field Values

ZoomOut

public static final int ZoomOut
See Also:
Constant Field Values

Up

public static final int Up
See Also:
Constant Field Values

Back

public static final int Back
See Also:
Constant Field Values

Forward

public static final int Forward
See Also:
Constant Field Values

Reload

public static final int Reload
See Also:
Constant Field Values

PopupMenuContext

public static final int PopupMenuContext
See Also:
Constant Field Values

ShowMenubar

public static final int ShowMenubar
See Also:
Constant Field Values

Help

public static final int Help
See Also:
Constant Field Values

WhatsThis

public static final int WhatsThis
See Also:
Constant Field Values

TextCompletion

public static final int TextCompletion
See Also:
Constant Field Values

PrevCompletion

public static final int PrevCompletion
See Also:
Constant Field Values

NextCompletion

public static final int NextCompletion
See Also:
Constant Field Values

SubstringCompletion

public static final int SubstringCompletion
See Also:
Constant Field Values

RotateUp

public static final int RotateUp
See Also:
Constant Field Values

RotateDown

public static final int RotateDown
See Also:
Constant Field Values

TabNext

public static final int TabNext
See Also:
Constant Field Values

TabPrev

public static final int TabPrev
See Also:
Constant Field Values

FullScreen

public static final int FullScreen
See Also:
Constant Field Values

BackwardWord

public static final int BackwardWord
See Also:
Constant Field Values

ForwardWord

public static final int ForwardWord
See Also:
Constant Field Values

BeginningOfLine

public static final int BeginningOfLine
See Also:
Constant Field Values

EndOfLine

public static final int EndOfLine
See Also:
Constant Field Values

PasteSelection

public static final int PasteSelection
See Also:
Constant Field Values

WhatThis

public static final int WhatThis
See Also:
Constant Field Values
Constructor Detail

KStdAccel

public KStdAccel()
Method Detail

shortcut

public static KShortcut shortcut(int id)
Returns the keybinding for accel.

Parameters:
id - the id of the accelerator

name

public static java.lang.String name(int id)
Returns a unique name for the given accel.

Parameters:
id - the id of the accelerator
Returns:
the unique name of the accelerator

label

public static java.lang.String label(int id)
Returns a localized label for user-visible display.

Parameters:
id - the id of the accelerator
Returns:
a localized label for the accelerator

whatsThis

public static java.lang.String whatsThis(int id)
Returns an extended WhatsThis description for the given accelerator.

Parameters:
id - the id of the accelerator
Returns:
a localized description of the accelerator

findStdAccel

public static int findStdAccel(KKeySequence keySeq)
Return the StdAccel id of the standard accel action which uses this key sequence, or AccelNone if none of them do. This is used by class KKeyChooser.

Parameters:
keySeq - the key sequence to search
Returns:
the id of the standard accelerator, or AccelNone if there is none

shortcutDefault

public static KShortcut shortcutDefault(int id)
Returns the hardcoded default shortcut for id. This does not take into account the user's configuration.

Parameters:
id - the id of the accelerator
Returns:
the default shortcut of the accelerator

shortcutDefault3

public static KShortcut shortcutDefault3(int id)
Returns the hardcoded default 3 modifier shortcut for id. This does not take into account the user's configuration.

Parameters:
id - the id of the accelerator
Returns:
the default 3 modifier shortcut

shortcutDefault4

public static KShortcut shortcutDefault4(int id)
Returns the hardcoded default 4 modifier shortcut for id. This does not take into account the user's configuration.

Parameters:
id - the id of the accelerator
Returns:
the default 4 modifier shortcut

open

public static KShortcut open()
Open file. Default: Ctrl-o

Returns:
the shortcut of the standard accelerator

openNew

public static KShortcut openNew()
Create a new document (or whatever). Default: Ctrl-n

Returns:
the shortcut of the standard accelerator

close

public static KShortcut close()
Close current document. Default: Ctrl-w

Returns:
the shortcut of the standard accelerator

save

public static KShortcut save()
Save current document. Default: Ctrl-s

Returns:
the shortcut of the standard accelerator

print

public static KShortcut print()
Print current document. Default: Ctrl-p

Returns:
the shortcut of the standard accelerator

quit

public static KShortcut quit()
Quit the program. Default: Ctrl-q

Returns:
the shortcut of the standard accelerator

undo

public static KShortcut undo()
Undo last operation. Default: Ctrl-z

Returns:
the shortcut of the standard accelerator

redo

public static KShortcut redo()
Redo. Default: Shift-Ctrl-z

Returns:
the shortcut of the standard accelerator

cut

public static KShortcut cut()
Cut selected area and store it in the clipboard. Default: Ctrl-x

Returns:
the shortcut of the standard accelerator

copy

public static KShortcut copy()
Copy selected area into the clipboard. Default: Ctrl-c

Returns:
the shortcut of the standard accelerator

paste

public static KShortcut paste()
Paste contents of clipboard at mouse/cursor position. Default: Ctrl-v

Returns:
the shortcut of the standard accelerator

pasteSelection

public static KShortcut pasteSelection()
Paste the selection at mouse/cursor position. Default: Ctrl-Shift-Insert

Returns:
the shortcut of the standard accelerator

selectAll

public static KShortcut selectAll()
Reload. Default: Ctrl-A

Returns:
the shortcut of the standard accelerator

deleteWordBack

public static KShortcut deleteWordBack()
Delete a word back from mouse/cursor position. Default: Ctrl-Backspace

Returns:
the shortcut of the standard accelerator

deleteWordForward

public static KShortcut deleteWordForward()
Delete a word forward from mouse/cursor position. Default: Ctrl-Delete

Returns:
the shortcut of the standard accelerator

find

public static KShortcut find()
Find, search. Default: Ctrl-f

Returns:
the shortcut of the standard accelerator

findNext

public static KShortcut findNext()
Find/search next. Default: F3

Returns:
the shortcut of the standard accelerator

findPrev

public static KShortcut findPrev()
Find/search previous. Default: Shift-F3

Returns:
the shortcut of the standard accelerator

replace

public static KShortcut replace()
Find and replace matches. Default: Ctrl-r

Returns:
the shortcut of the standard accelerator

zoomIn

public static KShortcut zoomIn()
Zoom in. Default: Ctrl-Plus

Returns:
the shortcut of the standard accelerator

zoomOut

public static KShortcut zoomOut()
Zoom out. Default: Ctrl-Minus

Returns:
the shortcut of the standard accelerator

home

public static KShortcut home()
Goto beginning of the document. Default: Ctrl-Home

Returns:
the shortcut of the standard accelerator

end

public static KShortcut end()
Goto end of the document. Default: Ctrl-End

Returns:
the shortcut of the standard accelerator

beginningOfLine

public static KShortcut beginningOfLine()
Goto beginning of current line. Default: Home

Returns:
the shortcut of the standard accelerator

endOfLine

public static KShortcut endOfLine()
Goto end of current line. Default: End

Returns:
the shortcut of the standard accelerator

prior

public static KShortcut prior()
Scroll up one page. Default: Prior

Returns:
the shortcut of the standard accelerator

next

public static KShortcut next()
Scroll down one page. Default: Next

Returns:
the shortcut of the standard accelerator

gotoLine

public static KShortcut gotoLine()
Go to line. Default: Ctrl+G

Returns:
the shortcut of the standard accelerator

addBookmark

public static KShortcut addBookmark()
Add current page to bookmarks. Default: Ctrl+B

Returns:
the shortcut of the standard accelerator

tabNext

public static KShortcut tabNext()
Next Tab. Default: Ctrl-<

Returns:
the shortcut of the standard accelerator

tabPrev

public static KShortcut tabPrev()
Previous Tab. Default: Ctrl.

Returns:
the shortcut of the standard accelerator

fullScreen

public static KShortcut fullScreen()
Full Screen Mode. Default: Ctrl+Shift+F

Returns:
the shortcut of the standard accelerator

help

public static KShortcut help()
Help the user in the current situation. Default: F1

Returns:
the shortcut of the standard accelerator

completion

public static KShortcut completion()
Complete text in input widgets. Default Ctrl+E

Returns:
the shortcut of the standard accelerator

prevCompletion

public static KShortcut prevCompletion()
Iterate through a list when completion returns multiple items. Default: Ctrl+Up

Returns:
the shortcut of the standard accelerator

nextCompletion

public static KShortcut nextCompletion()
Iterate through a list when completion returns multiple items. Default: Ctrl+Down

Returns:
the shortcut of the standard accelerator

substringCompletion

public static KShortcut substringCompletion()
Find a string within another string or list of strings. Default: Ctrl-T

Returns:
the shortcut of the standard accelerator

rotateUp

public static KShortcut rotateUp()
Help users iterate through a list of entries. Default: Up

Returns:
the shortcut of the standard accelerator

rotateDown

public static KShortcut rotateDown()
Help users iterate through a list of entries. Default: Down

Returns:
the shortcut of the standard accelerator

popupMenuContext

public static KShortcut popupMenuContext()
popup a context menu. Default: Menu

Returns:
the shortcut of the standard accelerator

whatsThis

public static KShortcut whatsThis()
What's This button. Default: Shift+F1

Returns:
the shortcut of the standard accelerator

reload

public static KShortcut reload()
Reload. Default: F5

Returns:
the shortcut of the standard accelerator

up

public static KShortcut up()
Up. Default: Alt+Up

Returns:
the shortcut of the standard accelerator

back

public static KShortcut back()
Back. Default: Alt+Left

Returns:
the shortcut of the standard accelerator

forward

public static KShortcut forward()
Forward. Default: ALT+Right

Returns:
the shortcut of the standard accelerator

backwardWord

public static KShortcut backwardWord()
BackwardWord. Default: Ctrl+Left

Returns:
the shortcut of the standard accelerator

forwardWord

public static KShortcut forwardWord()
ForwardWord. Default: Ctrl+Right

Returns:
the shortcut of the standard accelerator

showMenubar

public static KShortcut showMenubar()
Show Menu Bar. Default: Ctrl-M

Returns:
the shortcut of the standard accelerator