anchor.diff:              Right = Var.Create false
           }
   
  +    // Add the button listener if it hasn't been added already.
  +    // Button listener adds mousedown and mouseup events, which modify
  +    // MouseBtnSt vars.
       let ActivateButtonListener =
           let buttonListener (evt: Dom.MouseEvent) down =
               match evt.Button with
  
positive.code: 
      let ActivateKeyListener =
          if not KeyListenerState.KeyListenerActive then
              JQuery.Of(Dom.Document.Current).Keydown(fun el evt ->
                  let keyCode = evt.Which
                  JavaScript.Log <| "DOWN: " + (string keyCode)
                  Var.Set KeyListenerState.LastPressed keyCode
                  Var.Update KeyListenerState.KeysPressed
                      (fun xs ->
                          if not (List.exists (fun x -> x = keyCode) xs) then
                              keyCode :: xs
                          else xs)
              ) |> ignore
  
              JQuery.Of(Dom.Document.Current).Keyup(fun el evt ->
                  let keyCode = evt.Which
                  JavaScript.Log <| "UP: " + (string keyCode)
                  Var.Update KeyListenerState.KeysPressed
                      (List.filter (fun x -> x <> keyCode))
              ) |> ignore
  
negative.code:         static member Position =
  
              let onMouseMove (evt: Dom.Event) =
                  // We know this is a mouse event, so safe to downcast
                  let mEvt = evt :?> Dom.MouseEvent
                  Var.Set MousePosSt.PosV (mEvt.ClientX, mEvt.ClientY)
  
              // Add the mouse movement event if it's not there already.
              if not MousePosSt.Active then
                  Dom.Document.Current.AddEventListener("mousemove", onMouseMove, false)
                  MousePosSt.Active <- true
  