Index: src/gui.d ================================================================== --- src/gui.d +++ src/gui.d @@ -8,11 +8,10 @@ this(in Game g) { this.solver = new Solver(g); setup_size(g.map.W, g.map.H); setup_resources(); - setup_keyhandling(); draw(g); } private void delegate(char c) fn; void set_fn(F)(F f) { this.fn = f; } @@ -25,10 +24,12 @@ t.tick ~= (Timer sender, EventArgs ea){ fn(solver.single_step()); }; t.start(); this.closing ~= (Form f,CancelEventArgs c){t.stop();}; + } else { + setup_keyhandling(); } Application.run(this); } override void on_game_changed(char c, in Game g, bool finished)