{"action":"created","issue":{"url":"https://api.github.com/repos/z88dk/z88dk/issues/599","repository_url":"https://api.github.com/repos/z88dk/z88dk","labels_url":"https://api.github.com/repos/z88dk/z88dk/issues/599/labels{/name}","comments_url":"https://api.github.com/repos/z88dk/z88dk/issues/599/comments","events_url":"https://api.github.com/repos/z88dk/z88dk/issues/599/events","html_url":"https://github.com/z88dk/z88dk/issues/599","id":295669703,"number":599,"title":"[Z1013] kbhit and getk lock the computer with example","user":{"login":"Fabrizio-Caruso","id":29057615,"avatar_url":"https://avatars3.githubusercontent.com/u/29057615?v=4","gravatar_id":"","url":"https://api.github.com/users/Fabrizio-Caruso","html_url":"https://github.com/Fabrizio-Caruso","followers_url":"https://api.github.com/users/Fabrizio-Caruso/followers","following_url":"https://api.github.com/users/Fabrizio-Caruso/following{/other_user}","gists_url":"https://api.github.com/users/Fabrizio-Caruso/gists{/gist_id}","starred_url":"https://api.github.com/users/Fabrizio-Caruso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fabrizio-Caruso/subscriptions","organizations_url":"https://api.github.com/users/Fabrizio-Caruso/orgs","repos_url":"https://api.github.com/users/Fabrizio-Caruso/repos","events_url":"https://api.github.com/users/Fabrizio-Caruso/events{/privacy}","received_events_url":"https://api.github.com/users/Fabrizio-Caruso/received_events","type":"User","site_admin":false},"labels":[{"id":592451965,"url":"https://api.github.com/repos/z88dk/z88dk/labels/classiclib","name":"classiclib","color":"f9d0c4","default":false},{"id":342594057,"url":"https://api.github.com/repos/z88dk/z88dk/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2018-02-08T21:21:46Z","updated_at":"2018-04-06T09:26:38Z","closed_at":"2018-04-06T09:26:37Z","author_association":"NONE","body":"It seems that kbhit and/or getk and/or getch are broken in Z1013.\r\n\r\nThe following code is supposed to \r\n```\r\n#include <stdio.h>\r\n#include <conio.h>\r\n\r\nint main()\r\n{\r\n\tprintf(\"Press key\\n\");\r\n\r\n\twhile(kbhit())\r\n\t\tgetch();\r\n\twhile(!kbhit()){ \r\n\t}; \r\n\tgetch();\r\n\r\n\tprintf(\"key pressed\\n\");\r\n\t\r\n\treturn 0;\r\n}\r\n```\r\nwait for a key press and display the effect of the key press.\r\n\r\nIf compiled compiled for Z1013 with\r\n```\r\nz1013_wait_press:\r\n\t$(Z88DK_PATH)$(MYZ88DK) +z1013  $(SOURCE_PATH)/../experiments/wait_press.c \\\r\n\t-lndos -vn -clib=ansi \\\r\n\t-create-app -o\r\n\tmv $(BUILD_PATH)/../A.Z80 $(BUILD_PATH)/z1013_wait_press.z80\r\n\trm $(BUILD_PATH)/../a.bin\t\r\n```\r\nwill lock the computer forever.\r\n\r\nREMARK:\r\nI am getting a similar problem with just getk."},"comment":{"url":"https://api.github.com/repos/z88dk/z88dk/issues/comments/379199453","html_url":"https://github.com/z88dk/z88dk/issues/599#issuecomment-379199453","issue_url":"https://api.github.com/repos/z88dk/z88dk/issues/599","id":379199453,"user":{"login":"zx70","id":10224992,"avatar_url":"https://avatars1.githubusercontent.com/u/10224992?v=4","gravatar_id":"","url":"https://api.github.com/users/zx70","html_url":"https://github.com/zx70","followers_url":"https://api.github.com/users/zx70/followers","following_url":"https://api.github.com/users/zx70/following{/other_user}","gists_url":"https://api.github.com/users/zx70/gists{/gist_id}","starred_url":"https://api.github.com/users/zx70/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zx70/subscriptions","organizations_url":"https://api.github.com/users/zx70/orgs","repos_url":"https://api.github.com/users/zx70/repos","events_url":"https://api.github.com/users/zx70/events{/privacy}","received_events_url":"https://api.github.com/users/zx70/received_events","type":"User","site_admin":false},"created_at":"2018-04-06T09:26:37Z","updated_at":"2018-04-06T09:26:37Z","author_association":"OWNER","body":"Same fix just applied everywhere (all the monitor versions), they simply liked it and work better.\r\nThe only exception are the numeric keys on the flat foil keyboard, where getk stops receiving the ascii code when the key is kept pressed for a while."}}
{"actor":{"display_login":"zx70"}}