{"action":"created","issue":{"url":"https://api.github.com/repos/wesnoth/wesnoth/issues/1711","repository_url":"https://api.github.com/repos/wesnoth/wesnoth","labels_url":"https://api.github.com/repos/wesnoth/wesnoth/issues/1711/labels{/name}","comments_url":"https://api.github.com/repos/wesnoth/wesnoth/issues/1711/comments","events_url":"https://api.github.com/repos/wesnoth/wesnoth/issues/1711/events","html_url":"https://github.com/wesnoth/wesnoth/issues/1711","id":229872990,"number":1711,"title":"[set_menu_item] fires repeatedly if hotkey held down","user":{"login":"ln-zookeeper","id":4736758,"avatar_url":"https://avatars2.githubusercontent.com/u/4736758?v=4","gravatar_id":"","url":"https://api.github.com/users/ln-zookeeper","html_url":"https://github.com/ln-zookeeper","followers_url":"https://api.github.com/users/ln-zookeeper/followers","following_url":"https://api.github.com/users/ln-zookeeper/following{/other_user}","gists_url":"https://api.github.com/users/ln-zookeeper/gists{/gist_id}","starred_url":"https://api.github.com/users/ln-zookeeper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ln-zookeeper/subscriptions","organizations_url":"https://api.github.com/users/ln-zookeeper/orgs","repos_url":"https://api.github.com/users/ln-zookeeper/repos","events_url":"https://api.github.com/users/ln-zookeeper/events{/privacy}","received_events_url":"https://api.github.com/users/ln-zookeeper/received_events","type":"User","site_admin":false},"labels":[{"id":35865188,"url":"https://api.github.com/repos/wesnoth/wesnoth/labels/Bug","name":"Bug","color":"fc2929","default":false},{"id":595956080,"url":"https://api.github.com/repos/wesnoth/wesnoth/labels/Ready%20for%20testing","name":"Ready for testing","color":"5319e7","default":false},{"id":707219844,"url":"https://api.github.com/repos/wesnoth/wesnoth/labels/Regression","name":"Regression","color":"fc2929","default":false},{"id":597320134,"url":"https://api.github.com/repos/wesnoth/wesnoth/labels/UI","name":"UI","color":"d455f9","default":false}],"state":"open","locked":false,"assignee":{"login":"CelticMinstrel","id":578731,"avatar_url":"https://avatars3.githubusercontent.com/u/578731?v=4","gravatar_id":"","url":"https://api.github.com/users/CelticMinstrel","html_url":"https://github.com/CelticMinstrel","followers_url":"https://api.github.com/users/CelticMinstrel/followers","following_url":"https://api.github.com/users/CelticMinstrel/following{/other_user}","gists_url":"https://api.github.com/users/CelticMinstrel/gists{/gist_id}","starred_url":"https://api.github.com/users/CelticMinstrel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CelticMinstrel/subscriptions","organizations_url":"https://api.github.com/users/CelticMinstrel/orgs","repos_url":"https://api.github.com/users/CelticMinstrel/repos","events_url":"https://api.github.com/users/CelticMinstrel/events{/privacy}","received_events_url":"https://api.github.com/users/CelticMinstrel/received_events","type":"User","site_admin":false},"assignees":[{"login":"CelticMinstrel","id":578731,"avatar_url":"https://avatars3.githubusercontent.com/u/578731?v=4","gravatar_id":"","url":"https://api.github.com/users/CelticMinstrel","html_url":"https://github.com/CelticMinstrel","followers_url":"https://api.github.com/users/CelticMinstrel/followers","following_url":"https://api.github.com/users/CelticMinstrel/following{/other_user}","gists_url":"https://api.github.com/users/CelticMinstrel/gists{/gist_id}","starred_url":"https://api.github.com/users/CelticMinstrel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CelticMinstrel/subscriptions","organizations_url":"https://api.github.com/users/CelticMinstrel/orgs","repos_url":"https://api.github.com/users/CelticMinstrel/repos","events_url":"https://api.github.com/users/CelticMinstrel/events{/privacy}","received_events_url":"https://api.github.com/users/CelticMinstrel/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/wesnoth/wesnoth/milestones/7","html_url":"https://github.com/wesnoth/wesnoth/milestone/7","labels_url":"https://api.github.com/repos/wesnoth/wesnoth/milestones/7/labels","id":2501324,"number":7,"title":"1.14.0","description":"","creator":{"login":"CelticMinstrel","id":578731,"avatar_url":"https://avatars3.githubusercontent.com/u/578731?v=4","gravatar_id":"","url":"https://api.github.com/users/CelticMinstrel","html_url":"https://github.com/CelticMinstrel","followers_url":"https://api.github.com/users/CelticMinstrel/followers","following_url":"https://api.github.com/users/CelticMinstrel/following{/other_user}","gists_url":"https://api.github.com/users/CelticMinstrel/gists{/gist_id}","starred_url":"https://api.github.com/users/CelticMinstrel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CelticMinstrel/subscriptions","organizations_url":"https://api.github.com/users/CelticMinstrel/orgs","repos_url":"https://api.github.com/users/CelticMinstrel/repos","events_url":"https://api.github.com/users/CelticMinstrel/events{/privacy}","received_events_url":"https://api.github.com/users/CelticMinstrel/received_events","type":"User","site_admin":false},"open_issues":16,"closed_issues":14,"state":"open","created_at":"2017-05-04T22:32:30Z","updated_at":"2018-02-15T03:40:02Z","due_on":"2018-04-13T07:00:00Z","closed_at":null},"comments":3,"created_at":"2017-05-19T05:14:09Z","updated_at":"2018-02-15T07:26:40Z","closed_at":null,"author_association":"MEMBER","body":"If you assign a hotkey to a menu item, then that menu item will keep firing repeatedly (depending on your keyboard repeat delay/rate) if the hotkey is held down, of course assuming that the menu item actions themselves cause no interruption (such as a [message]).\r\n\r\nInstead, a menu item should only fire once per keypress regardless of how long the key stays down, presumably rather on key pressed rather than key released.\r\n\r\nPrompted by https://forums.wesnoth.org/viewtopic.php?t=46089\r\n\r\nEasy to reproduce with for example the following:\r\n```\r\n    [event]\r\n        name=start\r\n\r\n        {VARIABLE i 1}\r\n\r\n        [set_menu_item]\r\n            id=hotkeymenuitemtest\r\n            description=\"foo\"\r\n            use_hotkey=yes\r\n\r\n            [default_hotkey]\r\n                key=u\r\n            [/default_hotkey]\r\n\r\n            [command]\r\n                [floating_text]\r\n                    [filter]\r\n                        side=1\r\n                    [/filter]\r\n\r\n                    text=$i\r\n                [/floating_text]\r\n\r\n                {VARIABLE_OP i add 1}\r\n            [/command]\r\n        [/set_menu_item]\r\n    [/event]\r\n```"},"comment":{"url":"https://api.github.com/repos/wesnoth/wesnoth/issues/comments/365845297","html_url":"https://github.com/wesnoth/wesnoth/issues/1711#issuecomment-365845297","issue_url":"https://api.github.com/repos/wesnoth/wesnoth/issues/1711","id":365845297,"user":{"login":"Vultraz","id":3558659,"avatar_url":"https://avatars0.githubusercontent.com/u/3558659?v=4","gravatar_id":"","url":"https://api.github.com/users/Vultraz","html_url":"https://github.com/Vultraz","followers_url":"https://api.github.com/users/Vultraz/followers","following_url":"https://api.github.com/users/Vultraz/following{/other_user}","gists_url":"https://api.github.com/users/Vultraz/gists{/gist_id}","starred_url":"https://api.github.com/users/Vultraz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vultraz/subscriptions","organizations_url":"https://api.github.com/users/Vultraz/orgs","repos_url":"https://api.github.com/users/Vultraz/repos","events_url":"https://api.github.com/users/Vultraz/events{/privacy}","received_events_url":"https://api.github.com/users/Vultraz/received_events","type":"User","site_admin":false},"created_at":"2018-02-15T07:26:40Z","updated_at":"2018-02-15T07:26:40Z","author_association":"OWNER","body":"Just tested with this:\r\n```\r\n        {VARIABLE foo 0}\r\n        [set_menu_item]\r\n            id=footest\r\n            description=\"footest\"\r\n                [default_hotkey]\r\n            key=i\r\n        [/default_hotkey]\r\n            [command]\r\n                {VARIABLE_OP foo add 1}\r\n            [/command]\r\n        [/set_menu_item]\r\n```\r\n\r\nThe variable continues to increase as long as \"i\" is held down. Not fixed."}}
{"actor":{"display_login":"Vultraz"}}