{"id":"input.keyboard--ConsumeKeyPress","name":"ConsumeKeyPress","owner":"yeho","package":"input.keyboard","kind":"function","signature":"external ConsumeKeyPress(text key) -> bool","description":"Consumes one non-repeated key-down edge. This remains true across a short down/up tap until the caller observes it, then returns false until the next physical press.","context":"Poll named keys for the active application window.","parameters":[{"name":"key","type":"text","description":"Supply key as text."}],"returns":"bool","members":[],"tags":["cpu","function","input","input.keyboard","keyboard","source-example","yeho"],"updated":"2026-09-09","source":{"repository":"yeho","path":"packages/input/keyboard/keyboard.yh","line":9,"sha256":"b01cadd896e66d85658bea1e5e70feca5490cde784349db07af07dd1d4d933a1"},"status":"source-declared","notes":["Package presence and a declaration do not establish support on every host. Host services need their platform and lifecycle setup."],"examples":[{"id":"usage","title":"Use ConsumeKeyPress","description":"A complete small caller. Values are illustrative; check the returned result and package requirements before connecting live resources.","code":"using input.keyboard\n\n// Poll named keys for the active application window.\ntext key = \"key\"\nbool result = ConsumeKeyPress(key)\nConsole.Log(Text.From(result))\n","manifest":"manifestVersion = \"2\"\npackage = \"api.example.input_keyboard__consumekeypress\"\nversion = \"0.1.0\"\nlanguageEdition = \"yeho-core-2026.1\"\n\n[app]\nkind = \"headless\"\n\n[[dependencies]]\npackage = \"input.keyboard\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/input/keyboard\"\n","tags":["cpu","source-example"],"verification":"type checked","run":"cpu-oracle","sha256":"c01001bf84b050c934cc9da0de2276656dc2d9af348affe8ff59f3aed79d356a","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null}],"searchTerms":[],"url":"https://demonhunterlabs.com/academy/api?item=input.keyboard--ConsumeKeyPress","json":"https://demonhunterlabs.com/reference/items/input.keyboard--ConsumeKeyPress.json","markdown":"https://demonhunterlabs.com/reference/text/input.keyboard--ConsumeKeyPress.md"}
