Moved ctrl + line mover to key held

This commit is contained in:
itdominator 2024-09-20 21:27:42 -05:00
parent 765a60d154
commit 30634d9af7
2 changed files with 8 additions and 7 deletions

View File

@ -31,6 +31,11 @@ class KeyInputController:
return True
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
if is_alt:
@ -81,7 +86,7 @@ class KeyInputController:
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":
self.keyboard_undo()
if keyname == "y":
@ -108,11 +113,6 @@ class KeyInputController:
if keyname == "minus":
self.scale_down_text()
if keyname == "Up":
self.keyboard_move_lines_up()
if keyname == "Down":
self.keyboard_move_lines_down()
return True
# Note: Sink these requets

View File

@ -14,6 +14,7 @@ from .mixins.source_file_events_mixin import FileEventsMixin
from .mixins.source_mark_events_mixin import MarkEventsMixin
class SourceViewEvents(SourceViewDnDMixin, MarkEventsMixin, FileEventsMixin):
def _create_default_tag(self, buffer):
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):
if eve.button == 1 : # l-click
if eve.button == 1 : # l-click
self.keyboard_clear_marks()
if eve.state & Gdk.ModifierType.CONTROL_MASK:
self.go_to_call()