Input.ini settings

It is possible to configure keyboard actions for different contexts within Opera by editing the input.ini file. The contexts are hierarchically ordered, which means that if the currently-focused context does not have a handler for a specific key, the key event is passed on to the parent context.

Action strings

The action strings are in the format:

'Key value' = 'Action value', "argument string"

Key value

The key values are represented by the ASCII character of the key, or a string identifier for system keys. The key may have modifiers such as Alt, Shift, and Ctrl, as well as combinations of these.

Example: "g ctrl alt" will be activated when the keys Ctrl, Alt, and G are pressed at the same time.

Examples of valid system key values are as follows: "Space", "Right", "Left", "Down", "Up", "Backspace", "Enter", "PageUp", "PageDown", "Home", "End", "Esc", "Ins", "Del", "F1", and "F2". The values are not case sensitive.

Actions

The action value is a string that directs the action to take when the key is pressed. Examples of actions are as follows:

Value Comment
Back Back in history
Forward Forward in history
Navigate left/right/up/down Navigate left/right/up/down in the document
Scroll left/right/up/down Scroll the current frame left/right/up/down
Go, "<url>" Go the URL provided as the argument
Go to homepage Go to the predefined home page
Zoom in Zoom in
Zoom out Zoom out
Reload Reload the current page
Stop Stop the current page loading
External Action, "<action name>", "<action parameters>" External action that can be caught in the embedding API (see below)

For a more complete list of action values, see below.

Argument string

Some actions take argument strings. (see External Action below)

Multiple actions per key value

It is possible to trigger several actions at once with a single keystroke. It is also possible to set up keys so that they alternate between two different actions. This is illustrated below with a few examples:

[Dropdown Widget]
Ctrl Space = Select item & Unfocus form

This action will select the currently highlighted element in the drop-down list and then unfocus the drop-down list. This saves the user from having to first select the item and then leave the drop-down.

[Checkbox Widget]
Space = Check item | Uncheck item

With this declaration, the space button will either check or uncheck the item, depending on the context. The situations where this is possible, or not possible, should be intuitive.

External Action signal

The "External Action" event can be used for a user-defined action. Two argument strings may be passed along with the action. The first one is a name, so that the application can identify the appropriate action to take. The second argument is a string with additional parameters for the action. The "External Action" signal can only be added in the [Browser Window] context, but it will be triggered if a child of the [Browser Window] context is focused.

Example:

To send "action name" and the parameter string "action parameters" to the External Action callback when ctrl-s is pressed, add the folllowing line:

s ctrl = External Action, "action name", "action parameters"

Mouse gestures

It is possible to map mouse gestures to different actions by modifying the file input.ini. For more information about mouse gestures, see the Mouse gestures section.

The input contexts

The contexts are hierarchically ordered. When a key is pressed, a search for a matching action is started from the currently-focused context. If a context does not specify an action for the key, its parent context is searched. Once an action is found, the context to handle the action must be determined. The contexts from the currently-focused context to the context where the action was specified are searched. The first context with a handler for the action is selected and its handler is triggered. Thus it is possible for the parent to specify actions that affect its child contexts, and for the child contexts to override those actions.

Browser Window

The [Browser Window] context is the topmost context in the context hierarchy. It handles actions that modify the contents of the window. The following actions are defined for the [Browser Widget] context:

ValueComment
BackGo back in history
ForwardGo forward in history
StopStop loading of the current document.
ReloadReload the current document.
Go, "<url>"Go to the URL provided as the argument.
Go to homepageGo to the home page.
External Action, "<action name>", "<action parameters>"For more information, see external actions in this section.

Browser Widget

The [Browser Widget] is the generally the next in the context hierarchy. Many actions related to navigation are handled here. The following actions are defined for the [Browser Widget] context:

ValueComment
Activate elementThis will do different things depending on the focused element, including the following:.
Links will be opened in the current page.
Text areas and input fields will be entered allowing input.
The drop-down list will be navigated into, and require an additional "Show Dropdown" action to allow selection.
Buttons will be pressed.
Navigate leftNavigate to the element left of the current focus.
Navigate rightNavigate to the element right of the current focus.
Navigate upNavigate to the element over of the current focus.
Navigate downNavigate to the element below the current focus.
Focus formFocus/Enter the current focused element.
Unfocus formUnfocus/Leave the current focused element.
Highlight next URLNavigate to the next link in the document.
Highlight previous URLNavigate to the previous link in the document.
Highlight next headingNavigate to the next heading in the document.
Highlight previous headingNavigate to the previous heading in the document.
Open linkOpen the currently-focused link.
Open link in new pageOpen the currently-focused link in a new page.
Zoom in, "<scale>"Zoom in the current document with the amount according to the scale.
Zoom out, "<scale>"Zoom out the current document with the amount according to the scale.
Zoom to, "<scale>"Zoom the current document to the scale given in the argument.
Focus next widgetNavigate to the next input widget in the document.
Focus previous widgetNavigate to the previous input widget in the document.

Scrollable container

The [Scrollable Container] can be a browser widget, but also a DIV element or a text area element. It accepts actions related to scrolling. The following actions are defined for the [Scrollable Container] context:

ValueComment
Go to startScroll to the start of the content.
Go to endScroll to the end of the content.
Scroll right
Scroll left
Scroll down
Scroll up
Page upScroll one page up
Page downScroll one page down
Page leftScroll one page left
Page rightScroll one page right

There are several other contexts that may be modified. These have predefined settings and an embedder rarely needs to redefine them, however, they are listed here for clarity:

Form

ValueComment
Focus next radio widgetFocus the next radio widget in the form.
Focus previous radio widgetFocus the previous radio widget in the form.

Button Widget

ValueComment
Click button

Checkbox Widget

ValueComment
Check item
Uncheck item

Dropdown Widget

ValueComment
Show dropdownExpand the drop-down list.
Close dropdownCompress the drop-down list.
Select itemSelect the currently-highlighted element.
Next itemGo to the next element.
Previous itemGo to the previous element.
Go to startGo to the first element in the list.
Go to endGo to the last element in the list.
Unfocus formLeave the selection mode.

Edit Widget

ValueComment
Previous character
Next character
Range previous character
Range next character
Range previous word
Range next word
Previous line
Next line
Range previous line
Range next line
Page up
Page down
Range page up
Range page down
Go to line start
Go to line end
Range go to line start
Range go to line end
Go to start
Go to end
Range go to start
Range go to end
Delete word
Backspace
Left adjust text
Right adjust text
Next word
Previous word
Backspace word
Select allSelect all text.
ClearClear all input.
InsertInsert the selected text.
CutCut the selected text to clipboard.
CopyCopy the selected text to clipboard.
PastePaste the text from clipboard.

List Widget

ValueComment
Next item
Previous item
Range next item
Range previous item
Page up
Page down
Range page up
Range page down
Go to start
Go to end
Range go to start
Range go to end
Unfocus formLeave the selection mode.

Radiobutton Widget

ValueComment
Click button