@@ -4274,11 +4274,18 @@ procedure TEditBoxForm.KMemo1KeyDown(Sender: TObject; var Key: Word; Shift: TShi
4274
4274
VK_2 : AlterFont(ChangeSize, Sett.FontNormal);
4275
4275
VK_3 : AlterFont(ChangeSize, Sett.FontLarge);
4276
4276
VK_4 : AlterFont(ChangeSize, Sett.FontHuge);
4277
+ VK_TAB : begin if not CaretInTitle() then IndentControl(True); Key := 0 ; end ; // Mac ???
4277
4278
end ;
4278
4279
Key := 0 ;
4279
4280
exit;
4280
4281
end ;
4281
4282
if ([ssAlt, ssShift] = Shift) and ((Key = VK_RIGHT) or (Key = VK_LEFT)) then exit; // KMemo - extend selection one word left or right
4283
+ if ([ssShift] = shift) and (Key = VK_TAB) then begin
4284
+ if not CaretInTitle() then
4285
+ IndentControl(False);
4286
+ Key := 0 ;
4287
+ exit();
4288
+ end ;
4282
4289
{ $endif DARWIN}
4283
4290
4284
4291
if (Key = VK_ESCAPE) and Sett.CheckEscClosesNote.Checked then close; // Will do normal save stuff first.
@@ -4296,6 +4303,8 @@ procedure TEditBoxForm.KMemo1KeyDown(Sender: TObject; var Key: Word; Shift: TShi
4296
4303
Undoer.RecordInitial(Key); // used, onKeyPress must follow and it gets only text type keys.
4297
4304
4298
4305
4306
+
4307
+
4299
4308
{ $ifndef DARWIN}
4300
4309
// -------------- Shift -------------------
4301
4310
if [ssShift] = shift then begin
@@ -4318,7 +4327,7 @@ procedure TEditBoxForm.KMemo1KeyDown(Sender: TObject; var Key: Word; Shift: TShi
4318
4327
end ;
4319
4328
{ $endif}
4320
4329
4321
- // -------------- Control ------------------
4330
+ // -------------- Control (Command on Mac) ------------------
4322
4331
if { $ifdef Darwin} [ssMeta] = Shift { $else} [ssCtrl] = Shift{ $endif} then begin
4323
4332
case key of
4324
4333
VK_Return, VK_G : begin
@@ -4346,7 +4355,7 @@ procedure TEditBoxForm.KMemo1KeyDown(Sender: TObject; var Key: Word; Shift: TShi
4346
4355
VK_M : begin Key := 0 ; DoRightClickMenu; end ;
4347
4356
VK_N : SearchForm.OpenNote(' ' );
4348
4357
VK_E : InitiateCalc();
4349
- VK_TAB : begin if not CaretInTitle() then IndentControl(True); Key := 0 ; end ;
4358
+ VK_TAB : begin if not CaretInTitle() then IndentControl(True); Key := 0 ; end ; // On Mac, OS hijacks sequence for its own use.
4350
4359
VK_F4 : close; // close just this note, normal saving will take place
4351
4360
VK_C, VK_A, VK_HOME, VK_END, VK_UP, VK_DOWN, VK_LEFT, VK_RIGHT, VK_PRIOR, VK_NEXT, VK_INSERT : exit;
4352
4361
end ;
0 commit comments