mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
docs: Update examples of matching key bindings
The selector for matching GtkEntry has changed to `entry` after 3.20. https://bugzilla.gnome.org/show_bug.cgi?id=766166
This commit is contained in:
parent
ce0a7fa560
commit
6e2b9a1413
@ -69,13 +69,14 @@
|
||||
* movement occurs in 3-character steps), the following binding can be
|
||||
* used:
|
||||
*
|
||||
* |[
|
||||
* |[ <!-- language="CSS" -->
|
||||
* @binding-set MoveCursor3
|
||||
* {
|
||||
* bind "<Control>Right" { "move-cursor" (visual-positions, 3, 0) };
|
||||
* bind "<Control>Left" { "move-cursor" (visual-positions, -3, 0) };
|
||||
* }
|
||||
* GtkEntry
|
||||
*
|
||||
* entry
|
||||
* {
|
||||
* -gtk-key-bindings: MoveCursor3;
|
||||
* }
|
||||
@ -91,13 +92,14 @@
|
||||
* works as expected. The same mechanism can not be used to “unbind”
|
||||
* existing bindings, however.
|
||||
*
|
||||
* |[
|
||||
* |[ <!-- language="CSS" -->
|
||||
* @binding-set MoveCursor3
|
||||
* {
|
||||
* bind "<Control>Right" { };
|
||||
* bind "<Control>Left" { };
|
||||
* }
|
||||
* GtkEntry
|
||||
*
|
||||
* entry
|
||||
* {
|
||||
* -gtk-key-bindings: MoveCursor3;
|
||||
* }
|
||||
@ -114,13 +116,14 @@
|
||||
* from activating its default bindings, the “unbind” keyword can be used
|
||||
* like this:
|
||||
*
|
||||
* |[
|
||||
* |[ <!-- language="CSS" -->
|
||||
* @binding-set MoveCursor3
|
||||
* {
|
||||
* unbind "<Control>Right";
|
||||
* unbind "<Control>Left";
|
||||
* }
|
||||
* GtkEntry
|
||||
*
|
||||
* entry
|
||||
* {
|
||||
* -gtk-key-bindings: MoveCursor3;
|
||||
* }
|
||||
|
Loading…
Reference in New Issue
Block a user