Lock focus on cell / Identify reason for loss of focus

The code at the end of this post is a snake game. It’s a Dynamic Graphics wrapped in an EventHandler that responds to arrowkeys. A ScheduledTask does the logic five times a second. I hit shift-enter to create it, and click the Graphics with my mouse (border turns orange) to start controlling it.

However, once the score hits 10, the Notebook is no longer focused on the cell (border no longer orange) and key input stops. Loss of focus also happens if I uncomment the bezier curve drawing — perhaps excess computation in the task is causing it. Something that continually directs focus to the particular cell, i.e. having FrontEnd`MoveCursorToInputField in updatetask is not desired; I want to prevent unintentional loss of focus. Functions to help track focus in the Notebook would be useful too.

ClearAll[food, snake, dir, lastdir, updatetask, empty, \ reserverandomlocation, reserve, score] empty = Flatten[Table[{i, j}, {i, 0, 9}, {j, 0, 9}], 1]; reserve[point_] := (empty = DeleteCases[empty, point]; point);  reserverandomlocation[] := reserve@RandomSample[empty, 1][[1]]; food =   reserverandomlocation[]; snake = {reserverandomlocation[]}; dir = \ {Cos@#, Sin@#} &@((RandomInteger[3] \[Pi])/2); lastdir = {0,    0}; score = 1; updatetask =   SessionSubmit[   ScheduledTask[lastdir = dir;     With[{new = (Mod[#, 10] &) /@ (snake[[1]] + dir)},      If[food == new, ++score; food = reserverandomlocation[],       AppendTo[empty, Last@snake]; snake = Most@snake];      If[MemberQ[snake, new], dir = {0, 0}; TaskRemove@updatetask,       PrependTo[snake, reserve@new]]], Quantity[.2, "Seconds"]]]; EventHandler[  Dynamic@Graphics[{{Blue, snake, Red, food, Black,        empty} /. {a_ /; NumericQ@a, b_ /; NumericQ@b} :>        Rectangle[{a, b}, {a + 1, b + 1}], Black,      If[dir == {0, 0}, Text["dead", snake[[1]] + {1/2, 1/2}],       Arrow[{# - dir/3, # + dir/3} &[snake[[1]] + {1/2, 1/2}]]],      Text[ToString[score], food + {1/2, 1/2}](*,BezierCurve[#+{1/2,1/     2}&/@#]&/@Split[snake,Norm[#-#2]\[LessEqual]Sqrt[2]&]*)}],   MapThread[#2 <> "ArrowKeyDown" :>      If[Norm[# - lastdir] < 2, dir = #] &, {CirclePoints[{1, 0},      4], {"Right", "Up", "Left", "Down"}}]] 

P.S. how do you input grave in code? Certainly not like this &#96;.