def __init__(self): self.act = acthand.ActHand() self.act.keyhand = self # Here one can customize the key / function assignments self.reg_keytab = [ [gtk.keysyms.Up, self.act.up], [gtk.keysyms.KP_Up, self.act.up], [gtk.keysyms.Down, self.act.down], [gtk.keysyms.KP_Down, self.act.down], [gtk.keysyms.Left, self.act.left], [gtk.keysyms.KP_Left, self.act.left], [gtk.keysyms.Right, self.act.right], [gtk.keysyms.KP_Right, self.act.right], [gtk.keysyms.Page_Up, self.act.pgup], [gtk.keysyms.KP_Page_Up, self.act.pgup], [gtk.keysyms.Page_Down, self.act.pgdn], [gtk.keysyms.KP_Page_Down, self.act.pgdn], [gtk.keysyms.Home, self.act.home], [gtk.keysyms.KP_Home, self.act.home], [gtk.keysyms.End, self.act.end], [gtk.keysyms.KP_End, self.act.end], [gtk.keysyms.Delete, self.act.delete], [gtk.keysyms.KP_Delete, self.act.delete], [gtk.keysyms.BackSpace, self.act.bs], [gtk.keysyms.Return, self.act.ret], [gtk.keysyms.KP_Enter, self.act.ret], [gtk.keysyms.Escape, self.act.esc], [gtk.keysyms.Insert, self.act.ins], [gtk.keysyms.KP_Insert, self.act.ins], [gtk.keysyms.Tab, self.act.tab], [gtk.keysyms.ISO_Left_Tab, self.act.tab], [gtk.keysyms.F1, self.act.f1], [gtk.keysyms.F2, self.act.f2], [gtk.keysyms.F3, self.act.f3], [gtk.keysyms.F4, self.act.f4], [gtk.keysyms.F5, self.act.f5], [gtk.keysyms.F6, self.act.f6], [gtk.keysyms.F7, self.act.f7], [gtk.keysyms.F8, self.act.f8], [gtk.keysyms.F9, self.act.f9], [gtk.keysyms.F10, self.act.f10], [gtk.keysyms.F11, self.act.f11], #[gtk.keysyms.F12, self.act.f12], ] # Separate keytab on ctrl for easy customization. May call functions # in any other keytabs. (if sensitive to mod key, separate actions result) self.ctrl_keytab = [ [gtk.keysyms.Up, self.act.up], [gtk.keysyms.KP_Up, self.act.up], [gtk.keysyms.Down, self.act.down], [gtk.keysyms.KP_Down, self.act.down], [gtk.keysyms.Left, self.act.left], [gtk.keysyms.KP_Left, self.act.left], [gtk.keysyms.Right, self.act.right], [gtk.keysyms.KP_Right, self.act.right], [gtk.keysyms.Page_Up, self.act.pgup], [gtk.keysyms.KP_Page_Up, self.act.pgup], [gtk.keysyms.Page_Down, self.act.pgdn], [gtk.keysyms.KP_Page_Down, self.act.pgdn], [gtk.keysyms.Home, self.act.home], [gtk.keysyms.KP_Home, self.act.home], [gtk.keysyms.End, self.act.end], [gtk.keysyms.KP_End, self.act.end], [gtk.keysyms.Delete, self.act.delete], [gtk.keysyms.KP_Delete, self.act.delete], [gtk.keysyms.BackSpace, self.act.bs], [gtk.keysyms.F6, self.act.f6], [gtk.keysyms.F10, self.act.f10], [gtk.keysyms.a, self.act.ctrl_a], [gtk.keysyms.A, self.act.ctrl_a], [gtk.keysyms.b, self.act.ctrl_b], [gtk.keysyms.B, self.act.ctrl_b], [gtk.keysyms.c, self.act.ctrl_c], [gtk.keysyms.D, self.act.ctrl_d], [gtk.keysyms.d, self.act.ctrl_d], [gtk.keysyms.C, self.act.ctrl_c], [gtk.keysyms.e, self.act.ctrl_e], [gtk.keysyms.E, self.act.ctrl_e], [gtk.keysyms.f, self.act.ctrl_f], [gtk.keysyms.F, self.act.ctrl_f], [gtk.keysyms.h, self.act.ctrl_h], [gtk.keysyms.H, self.act.ctrl_h], [gtk.keysyms.i, self.act.ctrl_i], [gtk.keysyms.I, self.act.ctrl_i], [gtk.keysyms.j, self.act.ctrl_j], [gtk.keysyms.J, self.act.ctrl_j], [gtk.keysyms.k, self.act.ctrl_k], [gtk.keysyms.K, self.act.ctrl_k], [gtk.keysyms.l, self.act.ctrl_l], [gtk.keysyms.L, self.act.ctrl_l], [gtk.keysyms.m, self.act.ctrl_m], [gtk.keysyms.M, self.act.ctrl_m], [gtk.keysyms.g, self.act.ctrl_g], [gtk.keysyms.G, self.act.ctrl_g], [gtk.keysyms.r, self.act.ctrl_r], [gtk.keysyms.R, self.act.ctrl_r], [gtk.keysyms.t, self.act.ctrl_t], [gtk.keysyms.T, self.act.ctrl_t], [gtk.keysyms.u, self.act.ctrl_u], [gtk.keysyms.U, self.act.ctrl_u], [gtk.keysyms.v, self.act.ctrl_v], [gtk.keysyms.V, self.act.ctrl_v], [gtk.keysyms.x, self.act.ctrl_x], [gtk.keysyms.X, self.act.ctrl_x], [gtk.keysyms.y, self.act.ctrl_y], [gtk.keysyms.Y, self.act.ctrl_y], [gtk.keysyms.z, self.act.ctrl_z], [gtk.keysyms.Z, self.act.ctrl_z], [gtk.keysyms.space, self.act.ctrl_space], ] # Separate keytab on ctrl - alt for easy customization. # Do upper and lower for catching shift in the routine self.ctrl_alt_keytab = [ [gtk.keysyms.h, self.act.ctrl_alt_h], [gtk.keysyms.H, self.act.ctrl_alt_h], [gtk.keysyms.j, self.act.ctrl_alt_j], [gtk.keysyms.J, self.act.ctrl_alt_j], [gtk.keysyms.k, self.act.ctrl_alt_k], [gtk.keysyms.K, self.act.ctrl_alt_k], [gtk.keysyms.l, self.act.ctrl_alt_l], [gtk.keysyms.L, self.act.ctrl_alt_l], [gtk.keysyms.a, self.act.ctrl_alt_a], [gtk.keysyms.A, self.act.ctrl_alt_a], ] # Separate keytab on alt for easy customization. self.alt_keytab = [ [gtk.keysyms.Up, self.act.up], [gtk.keysyms.KP_Up, self.act.up], [gtk.keysyms.Down, self.act.down], [gtk.keysyms.KP_Down, self.act.down], [gtk.keysyms.Left, self.act.left], [gtk.keysyms.KP_Left, self.act.left], [gtk.keysyms.Right, self.act.right], [gtk.keysyms.KP_Right, self.act.right], [gtk.keysyms.Page_Up, self.act.pgup], [gtk.keysyms.KP_Page_Up, self.act.pgup], [gtk.keysyms.Page_Down, self.act.pgdn], [gtk.keysyms.KP_Page_Down, self.act.pgdn], [gtk.keysyms.Home, self.act.home], [gtk.keysyms.KP_Home, self.act.home], [gtk.keysyms.End, self.act.end], [gtk.keysyms.KP_End, self.act.end], [gtk.keysyms.Delete, self.act.delete], [gtk.keysyms.KP_Delete, self.act.delete], [gtk.keysyms.BackSpace, self.act.bs], [gtk.keysyms.a, self.act.alt_a], [gtk.keysyms.A, self.act.alt_a], [gtk.keysyms.b, self.act.alt_b], [gtk.keysyms.B, self.act.alt_b], [gtk.keysyms.c, self.act.alt_c], [gtk.keysyms.C, self.act.alt_c], [gtk.keysyms.d, self.act.alt_d], [gtk.keysyms.D, self.act.alt_d], [gtk.keysyms.f, self.act.alt_f], [gtk.keysyms.F, self.act.alt_f], [gtk.keysyms.g, self.act.alt_g], [gtk.keysyms.G, self.act.alt_g], [gtk.keysyms.i, self.act.alt_i], [gtk.keysyms.I, self.act.alt_i], [gtk.keysyms.j, self.act.alt_j], [gtk.keysyms.J, self.act.alt_j], [gtk.keysyms.k, self.act.alt_k], [gtk.keysyms.K, self.act.alt_k], [gtk.keysyms.l, self.act.alt_l], [gtk.keysyms.L, self.act.alt_l], [gtk.keysyms.o, self.act.alt_o], [gtk.keysyms.O, self.act.alt_o], [gtk.keysyms.q, self.act.alt_q], [gtk.keysyms.Q, self.act.alt_q], [gtk.keysyms.y, self.act.alt_y], [gtk.keysyms.Y, self.act.alt_y], [gtk.keysyms.p, self.act.f5], [gtk.keysyms.P, self.act.f5], [gtk.keysyms.n, self.act.f6], [gtk.keysyms.N, self.act.f6], [gtk.keysyms.r, self.act.ctrl_y], [gtk.keysyms.R, self.act.ctrl_y], [gtk.keysyms.s, self.act.alt_s], [gtk.keysyms.S, self.act.alt_s], [gtk.keysyms.t, self.act.alt_t], [gtk.keysyms.T, self.act.alt_t], [gtk.keysyms.u, self.act.ctrl_z], [gtk.keysyms.U, self.act.ctrl_z], [gtk.keysyms.v, self.act.alt_v], [gtk.keysyms.V, self.act.alt_v], [gtk.keysyms.w, self.act.alt_w], [gtk.keysyms.W, self.act.alt_w], [gtk.keysyms.z, self.act.alt_z], [gtk.keysyms.Z, self.act.alt_z], ]
#sys.path.append(modbase + os.sep + "panglib") #sys.path.append(modbase + os.sep + "pedlib") #sys.path.append(modbase + os.sep + "pycommon") #print(sys.path) import pedconfig # Commit global crap here pedconfig.conf = pedconfig.Conf() import keyhand import acthand import pedsql pedconfig.conf.acth = acthand.ActHand() pedconfig.conf.keyh = keyhand.KeyHand(pedconfig.conf.acth) pedconfig.conf.orig_path = orgbase import pedwin import pedlog import pedutil import pedplug import gi; gi.require_version("Gtk", "3.0") from gi.repository import Gtk from gi.repository import Gtk from gi.repository import Gdk from gi.repository import GLib from gi.repository import Gio
def __init__(self): self.act = acthand.ActHand() self.act.keyhand = self # Here one can customize the key / function assingments self.reg_keytab = [ [gtk.keysyms.Up, self.act.up], [gtk.keysyms.KP_Up, self.act.up], [gtk.keysyms.Down, self.act.down], [gtk.keysyms.KP_Down, self.act.down], [gtk.keysyms.Left, self.act.left], [gtk.keysyms.KP_Left, self.act.left], [gtk.keysyms.Right, self.act.right], [gtk.keysyms.KP_Right, self.act.right], [gtk.keysyms.Page_Up, self.act.pgup], [gtk.keysyms.KP_Page_Up, self.act.pgup], [gtk.keysyms.Page_Down, self.act.pgdn], [gtk.keysyms.KP_Page_Down, self.act.pgdn], [gtk.keysyms.Home, self.act.home], [gtk.keysyms.KP_Home, self.act.home], [gtk.keysyms.End, self.act.end], [gtk.keysyms.KP_End, self.act.end], [gtk.keysyms.Delete, self.act.delete], [gtk.keysyms.KP_Delete, self.act.delete], [gtk.keysyms.BackSpace, self.act.bs], [gtk.keysyms.Return, self.act.ret], [gtk.keysyms.Escape, self.act.esc], [gtk.keysyms.Insert, self.act.ins], [gtk.keysyms.KP_Insert, self.act.ins], [gtk.keysyms.F1, self.act.f1], [gtk.keysyms.F2, self.act.f2], [gtk.keysyms.F3, self.act.f3], [gtk.keysyms.F4, self.act.f4], [gtk.keysyms.F5, self.act.f5], [gtk.keysyms.F6, self.act.f6], [gtk.keysyms.F7, self.act.f7], [gtk.keysyms.F8, self.act.f8], [gtk.keysyms.F9, self.act.f9], [gtk.keysyms.F10, self.act.f10], [gtk.keysyms.F11, self.act.f11], [gtk.keysyms.F12, self.act.f12], ] # Separate keytab on ctrl for easy customization. May call functions # in any other keytabs. (if sensitive to mod key, separate actions result) self.ctrl_keytab = [ [gtk.keysyms.Up, self.act.up], [gtk.keysyms.KP_Up, self.act.up], [gtk.keysyms.Down, self.act.down], [gtk.keysyms.KP_Down, self.act.down], [gtk.keysyms.Left, self.act.left], [gtk.keysyms.KP_Left, self.act.left], [gtk.keysyms.Right, self.act.right], [gtk.keysyms.KP_Right, self.act.right], [gtk.keysyms.Page_Up, self.act.pgup], [gtk.keysyms.KP_Page_Up, self.act.pgup], [gtk.keysyms.Page_Down, self.act.pgdn], [gtk.keysyms.KP_Page_Down, self.act.pgdn], [gtk.keysyms.Home, self.act.home], [gtk.keysyms.KP_Home, self.act.home], [gtk.keysyms.End, self.act.end], [gtk.keysyms.KP_End, self.act.end], [gtk.keysyms.Delete, self.act.delete], [gtk.keysyms.KP_Delete, self.act.delete], [gtk.keysyms.BackSpace, self.act.bs], [gtk.keysyms.F6, self.act.f6], [gtk.keysyms.a, self.act.ctrl_a], [gtk.keysyms.A, self.act.ctrl_a], [gtk.keysyms.c, self.act.ctrl_c], [gtk.keysyms.C, self.act.ctrl_c], [gtk.keysyms.f, self.act.ctrl_f], [gtk.keysyms.F, self.act.ctrl_f], [gtk.keysyms.v, self.act.ctrl_v], [gtk.keysyms.V, self.act.ctrl_v], [gtk.keysyms.x, self.act.ctrl_x], [gtk.keysyms.X, self.act.ctrl_x], [gtk.keysyms.z, self.act.ctrl_z], [gtk.keysyms.Z, self.act.ctrl_z], ] # Separate keytab on ctrl - alt for easy customization. self.ctrl_alt_keytab = [ [gtk.keysyms.a, self.act.ctrl_alt_a], [gtk.keysyms.A, self.act.ctrl_alt_a], ] # Separate keytab on alt for easy customization. self.alt_keytab = [ [gtk.keysyms.Up, self.act.up], [gtk.keysyms.KP_Up, self.act.up], [gtk.keysyms.Down, self.act.down], [gtk.keysyms.KP_Down, self.act.down], [gtk.keysyms.Left, self.act.left], [gtk.keysyms.KP_Left, self.act.left], [gtk.keysyms.Right, self.act.right], [gtk.keysyms.KP_Right, self.act.right], [gtk.keysyms.Page_Up, self.act.pgup], [gtk.keysyms.KP_Page_Up, self.act.pgup], [gtk.keysyms.Page_Down, self.act.pgdn], [gtk.keysyms.KP_Page_Down, self.act.pgdn], [gtk.keysyms.Home, self.act.home], [gtk.keysyms.KP_Home, self.act.home], [gtk.keysyms.End, self.act.end], [gtk.keysyms.KP_End, self.act.end], [gtk.keysyms.Delete, self.act.delete], [gtk.keysyms.KP_Delete, self.act.delete], [gtk.keysyms.BackSpace, self.act.bs], [gtk.keysyms.s, self.act.alt_s], [gtk.keysyms.S, self.act.alt_s], [gtk.keysyms.w, self.act.alt_w], [gtk.keysyms.W, self.act.alt_w], [gtk.keysyms.g, self.act.alt_g], [gtk.keysyms.g, self.act.alt_g], ]
def __init__(self): self.act = acthand.ActHand() # Here one can customize the key / function assingments self.reg_keytab = [ [gtk.keysyms.Up, self.act.up], [gtk.keysyms.KP_Up, self.act.up], [gtk.keysyms.Down, self.act.down], [gtk.keysyms.KP_Down, self.act.down], [gtk.keysyms.Left, self.act.left], [gtk.keysyms.KP_Left, self.act.left], [gtk.keysyms.Right, self.act.right], [gtk.keysyms.KP_Right, self.act.right], [gtk.keysyms.Page_Up, self.act.pgup], [gtk.keysyms.KP_Page_Up, self.act.pgup], [gtk.keysyms.Page_Down, self.act.pgdn], [gtk.keysyms.KP_Page_Down, self.act.pgdn], [gtk.keysyms.Home, self.act.home], [gtk.keysyms.KP_Home, self.act.home], [gtk.keysyms.End, self.act.end], [gtk.keysyms.KP_End, self.act.end], [gtk.keysyms.Delete, self.act.delete], [gtk.keysyms.KP_Delete, self.act.delete], [gtk.keysyms.BackSpace, self.act.bs], [gtk.keysyms.Return, self.act.ret], [gtk.keysyms.Escape, self.act.esc], ] # Separate keytab on ctrl for easy customization. May call functions # in any other keytab. (if sensitive to mod key, separate actions result) self.ctrl_keytab = [ [gtk.keysyms.Up, self.act.up], [gtk.keysyms.KP_Up, self.act.up], [gtk.keysyms.Down, self.act.down], [gtk.keysyms.KP_Down, self.act.down], [gtk.keysyms.Left, self.act.left], [gtk.keysyms.KP_Left, self.act.left], [gtk.keysyms.Right, self.act.right], [gtk.keysyms.KP_Right, self.act.right], [gtk.keysyms.Page_Up, self.act.pgup], [gtk.keysyms.KP_Page_Up, self.act.pgup], [gtk.keysyms.Page_Down, self.act.pgdn], [gtk.keysyms.KP_Page_Down, self.act.pgdn], [gtk.keysyms.Home, self.act.home], [gtk.keysyms.KP_Home, self.act.home], [gtk.keysyms.End, self.act.end], [gtk.keysyms.KP_End, self.act.end], [gtk.keysyms.Delete, self.act.delete], [gtk.keysyms.KP_Delete, self.act.delete], [gtk.keysyms.BackSpace, self.act.bs], [gtk.keysyms.a, self.act.ctrl_a], [gtk.keysyms.A, self.act.ctrl_a], [gtk.keysyms.c, self.act.ctrl_c], [gtk.keysyms.C, self.act.ctrl_c], [gtk.keysyms.v, self.act.ctrl_v], [gtk.keysyms.V, self.act.ctrl_v], [gtk.keysyms.z, self.act.ctrl_z], [gtk.keysyms.Z, self.act.ctrl_z], ] self.ctrl_alt_keytab = [ [gtk.keysyms.A, self.act.ctrl_alt_a], [gtk.keysyms.a, self.act.ctrl_alt_a], ] self.alt_keytab = [ [gtk.keysyms.Up, self.act.up], [gtk.keysyms.KP_Up, self.act.up], [gtk.keysyms.Down, self.act.down], [gtk.keysyms.KP_Down, self.act.down], [gtk.keysyms.Left, self.act.left], [gtk.keysyms.KP_Left, self.act.left], [gtk.keysyms.Right, self.act.right], [gtk.keysyms.KP_Right, self.act.right], [gtk.keysyms.Page_Up, self.act.pgup], [gtk.keysyms.KP_Page_Up, self.act.pgup], [gtk.keysyms.Page_Down, self.act.pgdn], [gtk.keysyms.KP_Page_Down, self.act.pgdn], [gtk.keysyms.Home, self.act.home], [gtk.keysyms.KP_Home, self.act.home], [gtk.keysyms.End, self.act.end], [gtk.keysyms.KP_End, self.act.end], [gtk.keysyms.Delete, self.act.delete], [gtk.keysyms.KP_Delete, self.act.delete], [gtk.keysyms.BackSpace, self.act.bs], ]