How do I create compound keyboard shortcuts in a Windows Forms application?

前端 未结 5 1384
执念已碎
执念已碎 2020-12-31 07:28

I want to create a component that allows us to have compound keyboard shortcuts associated with an arbitrary command, like the Visual Studio IDE and Microsoft Office do.

5条回答
  •  灰色年华
    2020-12-31 08:13

    Use the form's OnKeyPressed event and check if the desired key combination was pressed in the eventArgs argument

提交回复
热议问题