I want the user to have the ability to move a row of data in a string grid up or down; basically swapping rows. What fits in well with the rest of the UI is Ctrl-UpArrow and Ctrl-DownArrow as the appropriate keys for these functions. This is easy to achieve using the OnKeyUp event of a stringgrid:
procedure TForm1.GridKeyUp(Sender: TObject; var Key: word; Shift: TShiftState);
begin
if (ssCtrl in Shift) and (Key in [38, 40]) then // Up/Down
MoveUpDown(Key = 38);
I also want to user to be able to click on a dropdown menu to achieve this. Also easy. What I CAN'T DO is assign any Ctrl-up/down arrows as a short-cut key for this menu action. Since the functionality has been obtained, all I need is the ability to have the menu up display "Ctrl-UpArrow" or better Ctrl-↑ in the appropriate place.
It there a better UI for this function - one that is popularly used? e.g Ctrl-U