This forum is temporaily read-only. All existing discussions remain available for reference. For new questions, bug reports or support requests, please contact us at mail@lmdsupport.com.

Shortcuts for "Select All" and "Undo" in Popup Menu

edited June 2011 in LMD ElPack
When right-clicking in a TElTreeInplaceEdit, a nice Popup menu comes up that allows Undo, Cut, Copy, Paste, Delete and Select All. I'd like to add the standard shortcuts for them. I managed to get Ctrl-X, Ctrl-C, Ctrl-V and the Del key to work.

But I can't seem to figure out how to hook Ctrl-Z into Undo and Ctrl-A into Select All. Is there an easy way to get these to work?

Comments

  • edited June 2011
    Actually, I think I figured it out. This is what I've done and it seems to work.

    procedure TOrganizePages.TagsDisplayInplaceEditEditorOnKeyUp(Sender: TObject;
      var Key: Word; Shift: TShiftState);
    begin
      case Key of
        $41: { A part of Ctrl-A }
          if ssCtrl in Shift then
            TCustomElEdit(Sender).SelectAll;
        $5a: { Z part of Ctrl-Z }
          if ssCtrl in Shift then
            TCustomElEdit(Sender).Undo;
        end;
    end;
Sign In or Register to comment.