This is the main program:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Leap;
using WindowsHookLib;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
KeyboardHook hk=new KeyboardHook();
Controller cntrl = new Controller();
Listener listener = new Listener();
private void Form1_Load(object sender, EventArgs e)
{
// Put your own handler here
hk.InstallHook();
cntrl.AddListener(listener);
cntrl.EnableGesture(Gesture.GestureType.TYPEKEYTAP);
cntrl.EnableGesture(Gesture.GestureType.TYPESWIPE);
}
private void Form1_Unload(object sender, EventArgs e)
{
cntrl.Dispose();
hk.RemoveHook(); }
}
}