do
    try $ spacing *> string "LAYOUT" *> endLine *> pure ()
    catMaybes <$> many (isHex *> klcKey)

klcKey ∷ (Logger m, Parser m) ⇒ m (Maybe Key)
klcKey = runMaybeT
shiftstate ∷ (Parser m, MonadFail m) ⇒ m Int
shiftstate = do
    [i] ← readLine
    maybe (fail $ "‘" ⊕ show i ⊕ "’ is not an integer") pure (readMaybe i)
shiftstate = do
    [i] ← readLine
    maybe (fail $ "‘" ⊕ show i ⊕ "’ is not an integer") pure (readMaybe i)