1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
   61
   62
   63
   64
   65
   66
   67
   68
   69
   70
   71
   72
   73
   74
   75
   76
   77
   78
   79
   80
   81
   82
   83

content / test / data / gtk_key_bindings_test_gtkrc [blame]

# 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"