{"action":"created","issue":{"url":"https://api.github.com/repos/littlevgl/lvgl/issues/263","repository_url":"https://api.github.com/repos/littlevgl/lvgl","labels_url":"https://api.github.com/repos/littlevgl/lvgl/issues/263/labels{/name}","comments_url":"https://api.github.com/repos/littlevgl/lvgl/issues/263/comments","events_url":"https://api.github.com/repos/littlevgl/lvgl/issues/263/events","html_url":"https://github.com/littlevgl/lvgl/issues/263","id":326573325,"number":263,"title":"How is the value for lv_roller set if control by keyboard?","user":{"login":"ngsann","id":18682407,"avatar_url":"https://avatars3.githubusercontent.com/u/18682407?v=4","gravatar_id":"","url":"https://api.github.com/users/ngsann","html_url":"https://github.com/ngsann","followers_url":"https://api.github.com/users/ngsann/followers","following_url":"https://api.github.com/users/ngsann/following{/other_user}","gists_url":"https://api.github.com/users/ngsann/gists{/gist_id}","starred_url":"https://api.github.com/users/ngsann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ngsann/subscriptions","organizations_url":"https://api.github.com/users/ngsann/orgs","repos_url":"https://api.github.com/users/ngsann/repos","events_url":"https://api.github.com/users/ngsann/events{/privacy}","received_events_url":"https://api.github.com/users/ngsann/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-25T15:39:17Z","updated_at":"2018-05-26T08:05:42Z","closed_at":"2018-05-26T08:05:42Z","author_association":"NONE","body":"When controlling the lv_roller by keyboard, LV_GROUP_KEY_LEFT, LV_GROUP_KEY_RIGHT, LV_GROUP_KEY_UP, LV_GROUP_KEY_DOWN controls the selection of the roller and LV_GROUP_KEY_ENTER calls the callback but when the roller is defocus, the value is reverted to the original value. How do I set the value?\r\n\r\nIn lv_roller.c, the sel_opt_id is saved when the roller gets focus and is reverted when it lost focus because sel_opt_id != sel_opt_id_ori \r\n\r\n```\r\nelse if(sign == LV_SIGNAL_FOCUS) \r\n{\r\n        ext->ddlist.sel_opt_id_ori = ext->ddlist.sel_opt_id;\r\n}\r\nelse if(sign == LV_SIGNAL_DEFOCUS) \r\n{\r\n        /*Revert the original state*/\r\n       if(ext->ddlist.sel_opt_id != ext->ddlist.sel_opt_id_ori) \r\n       {\r\n            ext->ddlist.sel_opt_id = ext->ddlist.sel_opt_id_ori;\r\n            refr_position(roller, true);\r\n        }\r\n}\r\n```\r\n\r\nLV_GROUP_KEY_ENTER does not set sel_opt_id_ori. Is this intentional? If so, how is sel_opt_id_ori set?\r\n\r\n```\r\nelse if (c == LV_GROUP_KEY_ENTER || c == LV_GROUP_KEY_ENTER_LONG) \r\n{\r\n            if(ext->ddlist.action)\r\n                ext->ddlist.action(roller);\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/littlevgl/lvgl/issues/comments/392245233","html_url":"https://github.com/littlevgl/lvgl/issues/263#issuecomment-392245233","issue_url":"https://api.github.com/repos/littlevgl/lvgl/issues/263","id":392245233,"user":{"login":"kisvegabor","id":7599318,"avatar_url":"https://avatars1.githubusercontent.com/u/7599318?v=4","gravatar_id":"","url":"https://api.github.com/users/kisvegabor","html_url":"https://github.com/kisvegabor","followers_url":"https://api.github.com/users/kisvegabor/followers","following_url":"https://api.github.com/users/kisvegabor/following{/other_user}","gists_url":"https://api.github.com/users/kisvegabor/gists{/gist_id}","starred_url":"https://api.github.com/users/kisvegabor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kisvegabor/subscriptions","organizations_url":"https://api.github.com/users/kisvegabor/orgs","repos_url":"https://api.github.com/users/kisvegabor/repos","events_url":"https://api.github.com/users/kisvegabor/events{/privacy}","received_events_url":"https://api.github.com/users/kisvegabor/received_events","type":"User","site_admin":false},"created_at":"2018-05-26T08:05:42Z","updated_at":"2018-05-26T08:05:42Z","author_association":"MEMBER","body":"Hi,\r\n\r\nIt was a bug. It should have update `sel_opt_id_ori`.\r\nI fixed it in the `beta` branch.\r\n\r\nThank you for reporting the issue!\r\n"}}
{"actor":{"display_login":"kisvegabor"}}