generated from itdominator/Python-With-Gtk-Template
Moved ctrl + line mover to key held
This commit is contained in:
parent
765a60d154
commit
30634d9af7
|
@ -31,6 +31,11 @@ class KeyInputController:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
if keyname in [ "slash", "Up", "Down", "m", "z", "y" ]:
|
if keyname in [ "slash", "Up", "Down", "m", "z", "y" ]:
|
||||||
|
if keyname == "Up":
|
||||||
|
self.keyboard_move_lines_up()
|
||||||
|
if keyname == "Down":
|
||||||
|
self.keyboard_move_lines_down()
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
if is_alt:
|
if is_alt:
|
||||||
|
@ -81,7 +86,7 @@ class KeyInputController:
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
if keyname in ["z", "y", "m", "s", "h", "g", "d", "k", "u", "space", "equal", "minus", "Up", "Down"]:
|
if keyname in ["z", "y", "m", "s", "h", "g", "d", "k", "u", "space", "equal", "minus"]:
|
||||||
if keyname == "z":
|
if keyname == "z":
|
||||||
self.keyboard_undo()
|
self.keyboard_undo()
|
||||||
if keyname == "y":
|
if keyname == "y":
|
||||||
|
@ -108,11 +113,6 @@ class KeyInputController:
|
||||||
if keyname == "minus":
|
if keyname == "minus":
|
||||||
self.scale_down_text()
|
self.scale_down_text()
|
||||||
|
|
||||||
if keyname == "Up":
|
|
||||||
self.keyboard_move_lines_up()
|
|
||||||
if keyname == "Down":
|
|
||||||
self.keyboard_move_lines_down()
|
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# Note: Sink these requets
|
# Note: Sink these requets
|
||||||
|
|
|
@ -14,6 +14,7 @@ from .mixins.source_file_events_mixin import FileEventsMixin
|
||||||
from .mixins.source_mark_events_mixin import MarkEventsMixin
|
from .mixins.source_mark_events_mixin import MarkEventsMixin
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class SourceViewEvents(SourceViewDnDMixin, MarkEventsMixin, FileEventsMixin):
|
class SourceViewEvents(SourceViewDnDMixin, MarkEventsMixin, FileEventsMixin):
|
||||||
def _create_default_tag(self, buffer):
|
def _create_default_tag(self, buffer):
|
||||||
general_style_tag = buffer.create_tag('general_style')
|
general_style_tag = buffer.create_tag('general_style')
|
||||||
|
@ -55,7 +56,7 @@ class SourceViewEvents(SourceViewDnDMixin, MarkEventsMixin, FileEventsMixin):
|
||||||
...
|
...
|
||||||
|
|
||||||
def _button_release_event(self, widget = None, eve = None, user_data = None):
|
def _button_release_event(self, widget = None, eve = None, user_data = None):
|
||||||
if eve.button == 1 : # l-click
|
if eve.button == 1 : # l-click
|
||||||
self.keyboard_clear_marks()
|
self.keyboard_clear_marks()
|
||||||
if eve.state & Gdk.ModifierType.CONTROL_MASK:
|
if eve.state & Gdk.ModifierType.CONTROL_MASK:
|
||||||
self.go_to_call()
|
self.go_to_call()
|
||||||
|
|
Loading…
Reference in New Issue