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;.

Can a character with the Magic Initiate feat use the appropriate arcane/druidic/holy focus?

The Magic Initiate feat lets you pick a few spells from a number of classes’ spell lists, each of which has their own rules for using a focus in place of material components – notably, it excludes the one casting class that cannot use a focus of any kind, the Ranger.

Also notably, while the feat makes it explicit that you use the appropriate attribute to cast that class’ spells – but not that you gain the use of the appropriate focus. Is there a reason to believe you also gain the ability to use the focus, as per the appropriate class’ Spellcasting (or Pact Magic) feature?

Can I just hold my Spellcasting Focus, instead of a material (with a price) that I own, to cast a spell?

Let’s say that I want to cast Soul Cage. I know that I need the tiny silver cage worth 100gp. Can I just have it attached to my belt and cast the spell using my Spellcasting focus, or do I need to hold specifically the tiny silver cage?

I’m a Hexblade Warlock with a glaive and the Improved Pact Weapon feature, wich makes my summoned glaive my Spellcasting Focus. I wonder if there’s a way to kill an enemy with my glaive then use my reaction to cast Soul Cage.

Do NPC spellcasters need a component pouch or an arcane focus?

By D&D 5e RAW, is it possible for the BBEG (or any NPC) to cast spells without needing material components? Alternatively, is there any powerful magic item (e.g. a ring or pendant) in the rulebooks that can allow its wielder to cast spells without needing a component pouch or an arcane focus?

In other words, is there any way I can repeal the following rule?

Casting some spells requires particular objects, specified in parentheses in the component entry. A character can use a component pouch or a spellcasting focus (found in chapter 5) in place of the components specified for a spell. … A spellcaster must have a hand free to access a spell’s material components—or to hold a spellcasting focus—but it can be the same hand that he or she uses to perform somatic components. (PHB p. 203)

Can a spellcasting focus be used in the casting of a spell with no Material components

I have looked for any rules on this and cannot find any, and before you say "It doesn’t matter flavour however you like" I have a specific example.

In the alchemist subclass for the artificer class the 5th level feature alchemist Savant reads:

Whenever you cast a spell using your alchemist’s supplies as the spellcasting focus

does this mean that if the spell has no matterial componants that it cannot use this feature?

Bard with a mind focus multiclass question 5e

I will be making a level 20 character for a D&D 5e one shot that will have alot of roleplay and combat. I want to be a bard plus something else. Either a lore or whisper bard and then either an Aberrant Mind Sorcerer or a Great Old One Warlock. I want to have at least 17 lvls of bard so at a key moment I can use true polymorph and turn into an aboleth. With all that in Mind, pun intended, what is the best combo for dealing damage or Survivability in a fight of 17 lvls of bard (lore or whisper) and 3 lvls of Aberrant Mind Sorcerer or a Great Old One Warlock?

Thank you in Advance.

Does Discipline Focus (Insightful Strikes) add the Wisdom bonus to each attack of Flashing Sun’s full-attack action?

Discipline Focus (Insightful Strikes) states the following:

At 4th level, you can add your Wisdom modifier as a bonus on damage rolls whenever you execute a strike from the chosen discipline. At 12th level, you can choose a second discipline to which this ability applies.

and Flashing Sun states the following:

Flashing sun allows you to make an additional melee attack during this round. As part of this maneuver, you take a full attack action and make your normal melee attacks. However, you can make one additional attack this round at your highest attack bonus. All the attacks you make this round, including the extra attack granted by this maneuver, are made with a -2 penalty.

So, the thing is, Flashing Sun includes a full attack in its description, and Insightful Strikes says "damage rolls", in plural. Does this mean that it adds the Wis bonus to each attack’s damage roll, only to the one added by the strike itself, or neither?