| # A keybinding set for testing GtkKeyBindingsHandler. |
| # chrome/browser/render_host/gtk_key_bindings_handler_unittest.cc and this |
| # file must be kept in sync. |
| # This file covers all key bindings supported by GtkKeyBindingsHandler. |
| |
| binding "gtk-key-bindings-handler" |
| { |
| # Test "move-cursor" |
| bind "<ctrl>1" { |
| "move-cursor" (logical-positions, -2, 0) |
| "move-cursor" (logical-positions, 2, 0) |
| "move-cursor" (visual-positions, -1, 1) |
| "move-cursor" (visual-positions, 1, 1) |
| "move-cursor" (words, -1, 0) |
| "move-cursor" (words, 1, 0) |
| "move-cursor" (display-lines, -1, 0) |
| "move-cursor" (display-lines, 1, 0) |
| "move-cursor" (display-line-ends, -1, 0) |
| "move-cursor" (display-line-ends, 1, 0) |
| "move-cursor" (paragraph-ends, -1, 0) |
| "move-cursor" (paragraph-ends, 1, 0) |
| "move-cursor" (pages, -1, 0) |
| "move-cursor" (pages, 1, 0) |
| "move-cursor" (buffer-ends, -1, 0) |
| "move-cursor" (buffer-ends, 1, 0) |
| } |
| |
| # Test "delete-from-cursor" |
| bind "<ctrl>2" { |
| "delete-from-cursor" (chars, -2) |
| "delete-from-cursor" (chars, 2) |
| "delete-from-cursor" (word-ends, -1) |
| "delete-from-cursor" (word-ends, 1) |
| "delete-from-cursor" (words, -1) |
| "delete-from-cursor" (words, 1) |
| "delete-from-cursor" (display-lines, -1) |
| "delete-from-cursor" (display-lines, 1) |
| "delete-from-cursor" (display-line-ends, -1) |
| "delete-from-cursor" (display-line-ends, 1) |
| "delete-from-cursor" (paragraph-ends, -1) |
| "delete-from-cursor" (paragraph-ends, 1) |
| "delete-from-cursor" (paragraphs, -1) |
| "delete-from-cursor" (paragraphs, 1) |
| } |
| |
| # Test backspace |
| bind "<ctrl>3" { |
| "backspace" () |
| } |
| |
| # Test copy-clipboard |
| bind "<ctrl>4" { |
| "copy-clipboard" () |
| } |
| |
| # Test cut-clipboard |
| bind "<ctrl>5" { |
| "cut-clipboard" () |
| } |
| |
| # Test insert-at-cursor |
| bind "<ctrl>6" { |
| "insert-at-cursor" ("hello") |
| } |
| |
| # Test paste-clipboard |
| bind "<ctrl>7" { |
| "paste-clipboard" () |
| } |
| |
| # Test select-all |
| bind "<ctrl>8" { |
| "select-all" (0) |
| "select-all" (1) |
| } |
| |
| # Test set-anchor |
| bind "<ctrl>9" { |
| "set-anchor" () |
| } |
| } |
| |
| class "GtkTextView" binding "gtk-key-bindings-handler" |