From 899e50b0f207bcd2ea4fe248b30ad25d8ecf0baf Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Mon, 21 Dec 2009 19:54:33 +0100 Subject: document Events/requests which the EM and its plugins listens for. most of all keybinds (WIP) --- README | 49 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 35 insertions(+), 14 deletions(-) (limited to 'README') diff --git a/README b/README index 61211a0..64aace4 100644 --- a/README +++ b/README @@ -94,20 +94,6 @@ The following commands are recognized: - if you want to unset a string, use `set` with one space after the equals sign * `print @` - use this to print the value of a variable. -* `bind = ` OUTDATED !!! - - sets the character sequence `` to invoke `` when typed interactively in uzbl - - there are a few tricks you can do: - * `` ends with an underscore: the command will only be invoked after pressing return/enter. If the user enters text where `` has the underscore, `%s` in the `` string will be replaced by this text. (optional) - * `` ends with an asterisk: similar behavior as with an underscore, but also makes the binding incremental (i.e. the command will be invoked on every keystroke). - * `` ends on a different character: you need to type the full string, which will trigger the command immediately, without pressing enter/return. - - examples: - * `bind o _ = uri %s` - - uzbl will load the url when you type: 'o ' - * `bind /* = search %s` - - a search command which is called on every character typed after the slash, letting you see the search narrow down while typing. - - Hitting return, enter or esc will terminate the search. - * `bind ZZ = exit` - - When you type `ZZ` and nothing else, the exit command will be triggered immediately. * `back` * `forward` @@ -497,6 +483,41 @@ Basically all events have this format: - `EVENT [uzbl_instance_name] PLUG_CREATED plug-id`: when uzbl-core is in xembed mode - `EVENT [uzbl_instance_name] BUILTINS command_list`: shows a list of all uzbl commands, whitespace separated, on startup +* Events/requests which the EM and its plugins listens for: + - `BIND` and `MODE_BIND`: define global resp. per-mode keybinds. + `request BIND = ` # set global keybinding (this is a shortcut for `request MODE_BIND global = `) + `request MODE_BIND = ` + The `` can be anything like 'command', 'insert,command', 'global', 'global,-insert'. + The `` has a special syntax: + * `` ends with an underscore: the command will only be invoked after pressing return/enter. If the user enters text where `` has the underscore, `%s` in the `` string will be replaced by this text. (optional) + * `` ends with an asterisk: similar behavior as with an underscore, but also makes the binding incremental (i.e. the command will be invoked on every keystroke). + * `` ends with an '!': the command will only be invoked after pressing return/enter, no replacement happens. this is useful for preventing 'x' to match when you want to bind 'xx' also. + * `` ends on a different character: you need to type the full string, which will trigger the command immediately, without pressing enter/return. + * TODO explain stacked bindings and what else am i missing? + examples: + * `event BIND o _ = uri %s` + - uzbl will load the url when you type: 'o ' + * `event BIND /* = search %s` + - a search command which is called on every character typed after the slash, letting you see the search narrow down while typing. + - Hitting return, enter or esc will terminate the search. + * `event BIND ZZ = exit` + - When you type `ZZ` and nothing else, the exit command will be triggered immediately. + - `MODE_CONFIG`: ?? + request MODE_CONFIG = + - `PROGRESS_CONFIG` + request PROGRESS_CONFIG = + - `MODMAD` + request MODMAP From To + - `IGNORE_KEY` + request IGNORE_KEY + - `MODKEY_ADDITION` + request MODKEY_ADDITION + - `TOGGLE_MODES` + event TOGGLE_MODES ... + + ### COMMAND LINE ARGUMENTS uzbl [ uri ] -- cgit v1.2.3 From 210c8591a81a12fb0fc5a2b40d4091a4903f63e6 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Mon, 21 Dec 2009 20:12:36 +0100 Subject: more documentation + MODE_BIND example in config --- README | 16 ++++++++++++---- examples/config/uzbl/config | 3 +++ 2 files changed, 15 insertions(+), 4 deletions(-) (limited to 'README') diff --git a/README b/README index 64aace4..7b1bcc3 100644 --- a/README +++ b/README @@ -94,7 +94,6 @@ The following commands are recognized: - if you want to unset a string, use `set` with one space after the equals sign * `print @` - use this to print the value of a variable. - * `back` * `forward` * `scroll ` @@ -484,8 +483,8 @@ Basically all events have this format: - `EVENT [uzbl_instance_name] BUILTINS command_list`: shows a list of all uzbl commands, whitespace separated, on startup * Events/requests which the EM and its plugins listens for: - - `BIND` and `MODE_BIND`: define global resp. per-mode keybinds. - `request BIND = ` # set global keybinding (this is a shortcut for `request MODE_BIND global = `) + - `BIND` and `MODE_BIND`: define global resp. per-mode key/button binds. + `request BIND = ` # set global binding (this is a shortcut for `request MODE_BIND global = `) `request MODE_BIND = ` The `` can be anything like 'command', 'insert,command', 'global', 'global,-insert'. The `` has a special syntax: @@ -493,7 +492,8 @@ Basically all events have this format: * `` ends with an asterisk: similar behavior as with an underscore, but also makes the binding incremental (i.e. the command will be invoked on every keystroke). * `` ends with an '!': the command will only be invoked after pressing return/enter, no replacement happens. this is useful for preventing 'x' to match when you want to bind 'xx' also. * `` ends on a different character: you need to type the full string, which will trigger the command immediately, without pressing enter/return. - * TODO explain stacked bindings and what else am i missing? + * TODO explain stacked bindings and multi-stage (is that the same?) and what else am i missing? modkeys, showing a prompt mid-bind. + The `` can be any representation of a key on your keyboard or a mousebutton. (note: not all mousebuttons work correctly yet) examples: * `event BIND o _ = uri %s` - uzbl will load the url when you type: 'o ' @@ -516,6 +516,14 @@ Basically all events have this format: request MODKEY_ADDITION - `TOGGLE_MODES` event TOGGLE_MODES ... + - `APPEND_KEYCMD`: append ` to keycmd + - `INJECT_KEYCMD `: replace keycmd by `` + - `KEYCMD_DELETE` + - `KEYCMD_STRIP_WORD` + - `KEYCMD_EXEC_CURRENT`: (tries to) execute whatever is in the keycmd + - `SET_KEYCMD` + - `SET_CURSOR_POS` + - `START_COMPLETION`: TODO explain completion diff --git a/examples/config/uzbl/config b/examples/config/uzbl/config index 33e074f..93002bf 100644 --- a/examples/config/uzbl/config +++ b/examples/config/uzbl/config @@ -8,6 +8,8 @@ set prefix = /usr/local # Config related events (use the request function): # request BIND = set bind = request BIND +# request MODE_BIND = +set mode_bind = request MODE_BIND # request MODE_CONFIG = @@ -161,6 +163,7 @@ menu_editable_add Open in @external_editor = script @scripts_dir/extedit.js @bind >> = scroll vertical end @bind ^ = scroll horizontal begin @bind $ = scroll horizontal end +@mode_bind global,-insert = scroll vertical end @bind b = back @bind m = forward @bind S = stop -- cgit v1.2.3