примерчик
public partial class Form1 : Form
{
private FHotkey hotKey;
int id = 0;
public Form1()
{
InitializeComponent();
hotKey = new FHotkey(2);
}
private void button1_Click(object sender, EventArgs e)
{
hotKey.RegisterHotKey(KeyModifier.Shift, Keys.K, OnKClicked, out id);
}
private void OnKClicked()
{
MessageBox.Show("Key 'Shift' + 'K' was pressed");
hotKey.UnRegisterAll();
hotKey.RegisterHotKey(KeyModifier.None, Keys.K, OnClicked, out id);
}
private void OnClicked()
{
MessageBox.Show("Key 'K' was pressed");
hotKey.UnRegisterHotKey(id);
}
}
проект создан в VS10