1 # -*- coding: utf-8 -*-
3 from xkeysnail
.transform
import *
8 transform
._mark
_set
= False
13 transform
._mark
_set
= False
15 if aa
: aa
= False; return K("esc")
20 transform
._mark
_set
= not transform
._mark
_set
;
23 define_keymap(re
.compile("Google-chrome|Chromium-browser|firefox"), {
24 K("C-b"): with_mark(K("left")),
25 K("C-f"): with_mark(K("right")),
26 K("C-p"): with_mark(K("up")),
27 K("C-n"): with_mark(K("down")),
28 K("M-b"): with_mark(K("C-left")),
29 K("M-f"): with_mark(K("C-right")),
30 K("C-a"): with_mark(K("home")),
31 K("C-e"): with_mark(K("end")),
33 K("C-w"): [K("C-x"), set_mark(False)],
34 K("M-w"): [K("C-c"), K("right"), set_mark(False)],
35 K("C-y"): [K("C-v"), set_mark(False)],
36 K("C-k"): [K("Shift-end"), K("C-x"), set_mark(False)],
37 K("C-d"): [K("delete"), set_mark(False)],
38 K("M-d"): [K("C-delete"), set_mark(False)],
39 K("M-backspace"): [K("C-backspace"), set_mark(False)],
41 K("C-slash"): [K("C-z"), set_mark(False)],
42 K("C-space"): aa_flipmark(),
43 K("C-M-space"): with_or_set_mark(K("C-right")),
46 # K("C-r"): K("Shift-F3"),
47 # K("C-g"): [K("esc"), set_mark(False)]
49 K("C-s"): [K("F3"), aa_setvar(True)],
50 K("C-r"): [K("Shift-F3"), aa_setvar(True)],
51 K("C-g"): [K("esc"), aa_setvar(False)],
52 K("enter"): aa_ifvar()