View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0025085||Lazarus||IDE||public||2013-09-25 20:46||2014-06-14 15:13|
|Reporter||Denis Golovan||Assigned To||Juha Manninen|
|Product Version||1.1 (SVN)|
|Summary||0025085: [Regression] Multi-stage shortcuts stopped working|
I've updated recently to Lazarus svn rev.42909 and found out that multi-staged (I don't know the proper naming for them) shortcuts stopped working.
I mean my "Ctrl+X, Ctrl+S" emacs-like shortcut skips Ctrl+X entirely and Lazarus sees only Ctrl+S.
Please fix this regression.
|Tags||No tags attached.|
|Fixed in Revision||r43351|
Works well here.
Make sure you have the keys mapped. Maybe you changed the keymapping scheme. The default scheme has only few "multi-stage" mappings, Classic scheme has many of them. There is no Emacs scheme at all. Maybe you saw a dream about an Emacs scheme. :)
BTW, if you or somebody wants to contribute an Emacs keymapping scheme, that would be nice.
I am quite sure they don't work.
I've created Ctrl+X then Ctrl+S shortcut for saving current file manually long ago. Of course, I don't use any default/predefined schemes for that.
Now main submenu "File" shows Ctrl+X,Ctrl+S shortcut as being defined for Save, but pressing Ctrl+X then Ctrl+S does not work.
Ok, defining Ctrl also with the second part still has an issue.
The logic was changed some time ago so that the second part works with and without Ctrl when the first part is defined with Ctrl and second part without it.
This is standard with the old WordStar compliant editors.
I remember I tested also this Ctrl+X,Ctrl+S style and it worked. I try to find time to see what happened. Or maybe you can look at the relevant code.(?) I will make a relation to the original issue.
Reverting rev. 41140 allows to get Ctrl+X,Ctrl+S working again.
The logic was moved away from SynEdit. The relevant code is now in unit KeyMapping, functions ShiftConflict and SetKeyCombo (below).
Maybe you have time to debug and fix it. If you do, please upload a patch. Otherwise I will debug it later.
function ShiftConflict(aKey: TSynEditKeyStroke): Boolean;
// This is called when first part of combo has Ctrl and 2nd part has Ctrl or nothing.
// Check if ignoring Ctrl in second part would create a conflict.
Result := False;
if aKey.Shift2 = [ssCtrl] then
ConflictShift := 
ConflictShift := [ssCtrl];
for x := 0 to ASynEditKeyStrokes.Count-1 do
with ASynEditKeyStrokes.Items[x] do
if (Key2 = aKey.Key2) and (Key = aKey.Key)
and (Shift2 = ConflictShift) and (Shift = aKey.Shift) then
Exit(True); // Found
procedure SetKeyCombo(aKey: TSynEditKeyStroke; aShortcut: PIDEShortCut);
// Define a key for a command
// Ignore the second Ctrl key in sequential combos.
// For example "Ctrl-X, Y" and "Ctrl-X, Ctrl-Y" are then treated the same.
if (aKey.Key2<>VK_UNKNOWN) and (aKey.Shift=[ssCtrl]) and (aKey.Shift2-[ssCtrl]=)
and not ShiftConflict(aKey) then
||Please test and close if OK.|
|2013-09-25 20:46||Denis Golovan||New Issue|
|2013-09-25 21:33||Juha Manninen||LazTarget||=> -|
|2013-09-25 21:33||Juha Manninen||Note Added: 0070328|
|2013-09-25 21:33||Juha Manninen||Assigned To||=> Juha Manninen|
|2013-09-25 21:33||Juha Manninen||Status||new => feedback|
|2013-09-25 21:35||Juha Manninen||Note Edited: 0070328||View Revisions|
|2013-09-25 21:36||Denis Golovan||Note Added: 0070329|
|2013-09-25 21:36||Denis Golovan||Status||feedback => assigned|
|2013-10-01 15:42||Juha Manninen||Note Added: 0070469|
|2013-10-01 16:09||Juha Manninen||Relationship added||related to 0024008|
|2013-10-27 18:44||Denis Golovan||Note Added: 0070999|
|2013-10-27 23:27||Juha Manninen||Note Added: 0071004|
|2013-11-02 11:04||Juha Manninen||Fixed in Revision||=> r43351|
|2013-11-02 11:04||Juha Manninen||Note Added: 0071098|
|2013-11-02 11:04||Juha Manninen||Status||assigned => resolved|
|2013-11-02 11:04||Juha Manninen||Resolution||open => fixed|
|2014-06-14 15:13||Denis Golovan||Note Added: 0075684|
|2014-06-14 15:13||Denis Golovan||Status||resolved => closed|