addMovement
    :: Functor f
    => String
    -> [GLFW.Key]
    -> Vector2 Widget.R
    -> Vector2 Widget.R
    -> [Movement]
    -> (Maybe ActiveState -> f ())
    -> Widget.EventHandlers f
addMovement name keys dir pos movements setState
    | name `elem` map (^. mName) movements = mempty
    | otherwise =
        mconcat
        [ mkKeyMap GLFW.KeyState'Pressed mk (EventMap.Doc ["Navigation", "FlyNav", name]) .
            setState . Just $ ActiveState pos (Movement name mk dir : movements)
        | key <- keys
        , let mk = modKey key
        ]
addMovement
    :: Functor f
    => String
    -> [GLFW.Key]
    -> Vector2 Widget.R
    -> Vector2 Widget.R
    -> [Movement]
    -> (Maybe ActiveState -> f ())
    -> Widget.EventHandlers f
addMovement name keys dir pos movements setState
    | name `elem` map (^. mName) movements = mempty
    | otherwise =
        mconcat
        [ mkKeyMap GLFW.KeyState'Pressed mk (EventMap.Doc ["Navigation", "FlyNav", name]) .
            setState . Just $ ActiveState pos (Movement name mk dir : movements)
        | key <- keys
        , let mk = modKey key
        ]
addMovement name keys dir pos movements setState
    | name `elem` map (^. mName) movements = mempty
    | otherwise =
        mconcat
        [ mkKeyMap GLFW.KeyState'Pressed mk (EventMap.Doc ["Navigation", "FlyNav", name]) .
            setState . Just $ ActiveState pos (Movement name mk dir : movements)
        | key <- keys
        , let mk = modKey key
        ]