Skip to content

Commit

Permalink
Update for extended VSCode map.
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnlaan committed Jun 26, 2024
1 parent 4e9574b commit 60742ff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Binary file modified Files/isscint.dll
Binary file not shown.
15 changes: 9 additions & 6 deletions Projects/Src/CompScintEdit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -226,13 +226,7 @@ procedure TCompScintEdit.CreateWnd;
Call(SCI_SETADDITIONALSELECTIONTYPING, 1, 0);
Call(SCI_SETMULTIPASTE, SC_MULTIPASTE_EACH, 0);

AssignCmdKey('C', [ssCtrl], SCI_COPYALLOWLINE);
AssignCmdKey(SCK_INSERT, [ssCtrl], SCI_COPYALLOWLINE);
AssignCmdKey('X', [ssCtrl], SCI_CUTALLOWLINE);
AssignCmdKey(SCK_DELETE, [ssShift], SCI_CUTALLOWLINE);
AssignCmdKey('Z', [ssShift, ssCtrl], SCI_REDO);
AssignCmdKey(SCK_UP, [ssAlt], SCI_MOVESELECTEDLINESUP);
AssignCmdKey(SCK_DOWN, [ssAlt], SCI_MOVESELECTEDLINESDOWN);

Call(SCI_SETSCROLLWIDTH, 1024 * CallStr(SCI_TEXTWIDTH, 0, 'X'), 0);

Expand Down Expand Up @@ -337,6 +331,15 @@ procedure TCompScintEdit.SetKeyMappingType(
if FKeyMappingType <> Value then begin
FKeyMappingType := Value;
Call(SCI_RESETALLCMDKEYS, Ord(FKeyMappingType = kmtVSCode), 0);
if FKeyMappingType = kmtDefault then begin
{ Take some compatible improvements from the VSCode map }
AssignCmdKey('C', [ssCtrl], SCI_COPYALLOWLINE);
AssignCmdKey(SCK_INSERT, [ssCtrl], SCI_COPYALLOWLINE);
AssignCmdKey('X', [ssCtrl], SCI_CUTALLOWLINE);
AssignCmdKey(SCK_DELETE, [ssShift], SCI_CUTALLOWLINE);
AssignCmdKey(SCK_UP, [ssAlt], SCI_MOVESELECTEDLINESUP);
AssignCmdKey(SCK_DOWN, [ssAlt], SCI_MOVESELECTEDLINESDOWN);
end;
Call(SCI_SETMOUSEMAPPING, Ord(FKeyMappingType = kmtVSCode), 0);
UpdateComplexCommands;
end;
Expand Down

0 comments on commit 60742ff

Please sign in to comment.