Fixed #6

Now remembers last toggle state, and keymode 2 & 3 work again.