- 291 名前:デフォルトの名無しさん mailto:sage [2020/09/23(水) 19:49:30.91 ID:SeN5l4G8a.net]
- 需要ないと思うけど暇だったので別スレで質問が出てたキー操作のシーケンスで発動する
キーボドショートカットを作ってみた https://ideone.com/FcOn5C 使い方: public partial class Form1 : Form { private KeyboardShortcutsDetector mKbsDetector = new KeyboardShortcutsDetector(); public Form1() { InitializeComponent(); mKbsDetector.AddKeyBinding(Keys.Control | Keys.K, Keys.Control | Keys.L, () => Console.WriteLine("Ctrl + K, L")); mKbsDetector.AddKeyBinding(Keys.Control | Keys.K, Keys.Control | Keys.M, () => Console.WriteLine("Ctrl + K, M")); mKbsDetector.AddKeyBinding(Keys.Control | Keys.J, Keys.Control | Keys.U, () => Console.WriteLine("Ctrl + J, U")); } protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { return mKbsDetector.ProcessKey(keyData) ? true : base.ProcessCmdKey(ref msg, keyData); } } 退屈なコードだからたぶん見るだけ時間の無駄だと思うw
|

|