{"action":"created","comment":{"url":"https://api.github.com/repos/Vachok/Java_Lessons/pulls/comments/158702160","pull_request_review_id":85548873,"id":158702160,"diff_hunk":"@@ -16,7 +16,14 @@ public static void main(String[] args) {\n       jPanel.add(jButton);\n       \n       KeyStroke keyStroke = KeyStroke.getKeyStroke(\"ctrl B\"); // создание сочетания клавиш для экшена\n-      InputMap inputMap = jPanel.getInputMap(JComponent.) // todo\n+      InputMap inputMap = jPanel.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); // создание деёствия \"слежения\" за клавишами\n+      inputMap.put(keyStroke, \"changeColor\"); // добавление в компонент слежки сочетания клавиш. вызовет keyStroke с ИД \"changeColor\"\n+      ActionMap actionMap = jPanel.getActionMap();\n+      actionMap.put(\"changeColor\", myAction);\n+      /*Есть inputmap, которая достается из панели\n+       мы говорим ей, что хотим использовать её когда компонент в фокусе\n+       помещаем в мапу сочетание, которое будет вызывать некий объект с ИД\n+       Как-бы привязываем стоку \"changeColor\" к сочетанию ctrl B*/","path":"Lessons/src/KeyStrokeLesson.java","position":null,"original_position":12,"commit_id":"deedf846124e8390bc2b1afa725d9ff32f291d86","original_commit_id":"fd988a6f666c53687a26a321259a258be1acafc6","user":{"login":"Vachok","id":33656095,"avatar_url":"https://avatars2.githubusercontent.com/u/33656095?v=4","gravatar_id":"","url":"https://api.github.com/users/Vachok","html_url":"https://github.com/Vachok","followers_url":"https://api.github.com/users/Vachok/followers","following_url":"https://api.github.com/users/Vachok/following{/other_user}","gists_url":"https://api.github.com/users/Vachok/gists{/gist_id}","starred_url":"https://api.github.com/users/Vachok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vachok/subscriptions","organizations_url":"https://api.github.com/users/Vachok/orgs","repos_url":"https://api.github.com/users/Vachok/repos","events_url":"https://api.github.com/users/Vachok/events{/privacy}","received_events_url":"https://api.github.com/users/Vachok/received_events","type":"User","site_admin":false},"body":"Не отрабатывает!\r\n\r\nhttps://youtu.be/mvsOAbJ_5y4?t=10m9s\r\nЕсть inputmap, которая достается из панели\r\nмы говорим ей, что хотим использовать её когда компонент в фокусе\r\nпомещаем в мапу сочетание, которое будет вызывать некий объект с ИД\r\nКак-бы привязываем стоку \"changeColor\" к сочетанию ctrl B","created_at":"2017-12-26T12:42:59Z","updated_at":"2017-12-26T12:43:26Z","html_url":"https://github.com/Vachok/Java_Lessons/pull/204#discussion_r158702160","pull_request_url":"https://api.github.com/repos/Vachok/Java_Lessons/pulls/204","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/Vachok/Java_Lessons/pulls/comments/158702160"},"html":{"href":"https://github.com/Vachok/Java_Lessons/pull/204#discussion_r158702160"},"pull_request":{"href":"https://api.github.com/repos/Vachok/Java_Lessons/pulls/204"}}},"pull_request":{"url":"https://api.github.com/repos/Vachok/Java_Lessons/pulls/204","id":160124992,"html_url":"https://github.com/Vachok/Java_Lessons/pull/204","diff_url":"https://github.com/Vachok/Java_Lessons/pull/204.diff","patch_url":"https://github.com/Vachok/Java_Lessons/pull/204.patch","issue_url":"https://api.github.com/repos/Vachok/Java_Lessons/issues/204","number":204,"state":"open","locked":false,"title":"187.103 key stroke","user":{"login":"Vachok","id":33656095,"avatar_url":"https://avatars2.githubusercontent.com/u/33656095?v=4","gravatar_id":"","url":"https://api.github.com/users/Vachok","html_url":"https://github.com/Vachok","followers_url":"https://api.github.com/users/Vachok/followers","following_url":"https://api.github.com/users/Vachok/following{/other_user}","gists_url":"https://api.github.com/users/Vachok/gists{/gist_id}","starred_url":"https://api.github.com/users/Vachok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vachok/subscriptions","organizations_url":"https://api.github.com/users/Vachok/orgs","repos_url":"https://api.github.com/users/Vachok/repos","events_url":"https://api.github.com/users/Vachok/events{/privacy}","received_events_url":"https://api.github.com/users/Vachok/received_events","type":"User","site_admin":false},"body":"#187 ","created_at":"2017-12-26T12:39:23Z","updated_at":"2017-12-26T12:43:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b2966197f6bc6dcb9ab3ba9287369f2887ecc82f","assignee":{"login":"Vachok","id":33656095,"avatar_url":"https://avatars2.githubusercontent.com/u/33656095?v=4","gravatar_id":"","url":"https://api.github.com/users/Vachok","html_url":"https://github.com/Vachok","followers_url":"https://api.github.com/users/Vachok/followers","following_url":"https://api.github.com/users/Vachok/following{/other_user}","gists_url":"https://api.github.com/users/Vachok/gists{/gist_id}","starred_url":"https://api.github.com/users/Vachok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vachok/subscriptions","organizations_url":"https://api.github.com/users/Vachok/orgs","repos_url":"https://api.github.com/users/Vachok/repos","events_url":"https://api.github.com/users/Vachok/events{/privacy}","received_events_url":"https://api.github.com/users/Vachok/received_events","type":"User","site_admin":false},"assignees":[{"login":"Vachok","id":33656095,"avatar_url":"https://avatars2.githubusercontent.com/u/33656095?v=4","gravatar_id":"","url":"https://api.github.com/users/Vachok","html_url":"https://github.com/Vachok","followers_url":"https://api.github.com/users/Vachok/followers","following_url":"https://api.github.com/users/Vachok/following{/other_user}","gists_url":"https://api.github.com/users/Vachok/gists{/gist_id}","starred_url":"https://api.github.com/users/Vachok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vachok/subscriptions","organizations_url":"https://api.github.com/users/Vachok/orgs","repos_url":"https://api.github.com/users/Vachok/repos","events_url":"https://api.github.com/users/Vachok/events{/privacy}","received_events_url":"https://api.github.com/users/Vachok/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":{"url":"https://api.github.com/repos/Vachok/Java_Lessons/milestones/3","html_url":"https://github.com/Vachok/Java_Lessons/milestone/3","labels_url":"https://api.github.com/repos/Vachok/Java_Lessons/milestones/3/labels","id":2996179,"number":3,"title":"SWING","description":null,"creator":{"login":"Vachok","id":33656095,"avatar_url":"https://avatars2.githubusercontent.com/u/33656095?v=4","gravatar_id":"","url":"https://api.github.com/users/Vachok","html_url":"https://github.com/Vachok","followers_url":"https://api.github.com/users/Vachok/followers","following_url":"https://api.github.com/users/Vachok/following{/other_user}","gists_url":"https://api.github.com/users/Vachok/gists{/gist_id}","starred_url":"https://api.github.com/users/Vachok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vachok/subscriptions","organizations_url":"https://api.github.com/users/Vachok/orgs","repos_url":"https://api.github.com/users/Vachok/repos","events_url":"https://api.github.com/users/Vachok/events{/privacy}","received_events_url":"https://api.github.com/users/Vachok/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":15,"state":"open","created_at":"2017-12-24T09:05:01Z","updated_at":"2017-12-26T12:41:04Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/Vachok/Java_Lessons/pulls/204/commits","review_comments_url":"https://api.github.com/repos/Vachok/Java_Lessons/pulls/204/comments","review_comment_url":"https://api.github.com/repos/Vachok/Java_Lessons/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Vachok/Java_Lessons/issues/204/comments","statuses_url":"https://api.github.com/repos/Vachok/Java_Lessons/statuses/deedf846124e8390bc2b1afa725d9ff32f291d86","head":{"label":"Vachok:187.103-KeyStroke","ref":"187.103-KeyStroke","sha":"deedf846124e8390bc2b1afa725d9ff32f291d86","user":{"login":"Vachok","id":33656095,"avatar_url":"https://avatars2.githubusercontent.com/u/33656095?v=4","gravatar_id":"","url":"https://api.github.com/users/Vachok","html_url":"https://github.com/Vachok","followers_url":"https://api.github.com/users/Vachok/followers","following_url":"https://api.github.com/users/Vachok/following{/other_user}","gists_url":"https://api.github.com/users/Vachok/gists{/gist_id}","starred_url":"https://api.github.com/users/Vachok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vachok/subscriptions","organizations_url":"https://api.github.com/users/Vachok/orgs","repos_url":"https://api.github.com/users/Vachok/repos","events_url":"https://api.github.com/users/Vachok/events{/privacy}","received_events_url":"https://api.github.com/users/Vachok/received_events","type":"User","site_admin":false},"repo":{"id":112817441,"name":"Java_Lessons","full_name":"Vachok/Java_Lessons","owner":{"login":"Vachok","id":33656095,"avatar_url":"https://avatars2.githubusercontent.com/u/33656095?v=4","gravatar_id":"","url":"https://api.github.com/users/Vachok","html_url":"https://github.com/Vachok","followers_url":"https://api.github.com/users/Vachok/followers","following_url":"https://api.github.com/users/Vachok/following{/other_user}","gists_url":"https://api.github.com/users/Vachok/gists{/gist_id}","starred_url":"https://api.github.com/users/Vachok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vachok/subscriptions","organizations_url":"https://api.github.com/users/Vachok/orgs","repos_url":"https://api.github.com/users/Vachok/repos","events_url":"https://api.github.com/users/Vachok/events{/privacy}","received_events_url":"https://api.github.com/users/Vachok/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Vachok/Java_Lessons","description":"by https://www.youtube.com/playlist?list=PL786bPIlqEjRDXpAKYbzpdTaOYsWyjtCX","fork":false,"url":"https://api.github.com/repos/Vachok/Java_Lessons","forks_url":"https://api.github.com/repos/Vachok/Java_Lessons/forks","keys_url":"https://api.github.com/repos/Vachok/Java_Lessons/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Vachok/Java_Lessons/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Vachok/Java_Lessons/teams","hooks_url":"https://api.github.com/repos/Vachok/Java_Lessons/hooks","issue_events_url":"https://api.github.com/repos/Vachok/Java_Lessons/issues/events{/number}","events_url":"https://api.github.com/repos/Vachok/Java_Lessons/events","assignees_url":"https://api.github.com/repos/Vachok/Java_Lessons/assignees{/user}","branches_url":"https://api.github.com/repos/Vachok/Java_Lessons/branches{/branch}","tags_url":"https://api.github.com/repos/Vachok/Java_Lessons/tags","blobs_url":"https://api.github.com/repos/Vachok/Java_Lessons/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Vachok/Java_Lessons/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Vachok/Java_Lessons/git/refs{/sha}","trees_url":"https://api.github.com/repos/Vachok/Java_Lessons/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Vachok/Java_Lessons/statuses/{sha}","languages_url":"https://api.github.com/repos/Vachok/Java_Lessons/languages","stargazers_url":"https://api.github.com/repos/Vachok/Java_Lessons/stargazers","contributors_url":"https://api.github.com/repos/Vachok/Java_Lessons/contributors","subscribers_url":"https://api.github.com/repos/Vachok/Java_Lessons/subscribers","subscription_url":"https://api.github.com/repos/Vachok/Java_Lessons/subscription","commits_url":"https://api.github.com/repos/Vachok/Java_Lessons/commits{/sha}","git_commits_url":"https://api.github.com/repos/Vachok/Java_Lessons/git/commits{/sha}","comments_url":"https://api.github.com/repos/Vachok/Java_Lessons/comments{/number}","issue_comment_url":"https://api.github.com/repos/Vachok/Java_Lessons/issues/comments{/number}","contents_url":"https://api.github.com/repos/Vachok/Java_Lessons/contents/{+path}","compare_url":"https://api.github.com/repos/Vachok/Java_Lessons/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Vachok/Java_Lessons/merges","archive_url":"https://api.github.com/repos/Vachok/Java_Lessons/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Vachok/Java_Lessons/downloads","issues_url":"https://api.github.com/repos/Vachok/Java_Lessons/issues{/number}","pulls_url":"https://api.github.com/repos/Vachok/Java_Lessons/pulls{/number}","milestones_url":"https://api.github.com/repos/Vachok/Java_Lessons/milestones{/number}","notifications_url":"https://api.github.com/repos/Vachok/Java_Lessons/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Vachok/Java_Lessons/labels{/name}","releases_url":"https://api.github.com/repos/Vachok/Java_Lessons/releases{/id}","deployments_url":"https://api.github.com/repos/Vachok/Java_Lessons/deployments","created_at":"2017-12-02T06:05:04Z","updated_at":"2017-12-20T22:51:56Z","pushed_at":"2017-12-26T12:39:24Z","git_url":"git://github.com/Vachok/Java_Lessons.git","ssh_url":"git@github.com:Vachok/Java_Lessons.git","clone_url":"https://github.com/Vachok/Java_Lessons.git","svn_url":"https://github.com/Vachok/Java_Lessons","homepage":null,"size":607,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":13,"license":{"key":"unlicense","name":"The Unlicense","spdx_id":"Unlicense","url":"https://api.github.com/licenses/unlicense"},"forks":0,"open_issues":13,"watchers":1,"default_branch":"master"}},"base":{"label":"Vachok:master","ref":"master","sha":"9492e9a0e9bc0922080660eb6776e44e6c2da867","user":{"login":"Vachok","id":33656095,"avatar_url":"https://avatars2.githubusercontent.com/u/33656095?v=4","gravatar_id":"","url":"https://api.github.com/users/Vachok","html_url":"https://github.com/Vachok","followers_url":"https://api.github.com/users/Vachok/followers","following_url":"https://api.github.com/users/Vachok/following{/other_user}","gists_url":"https://api.github.com/users/Vachok/gists{/gist_id}","starred_url":"https://api.github.com/users/Vachok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vachok/subscriptions","organizations_url":"https://api.github.com/users/Vachok/orgs","repos_url":"https://api.github.com/users/Vachok/repos","events_url":"https://api.github.com/users/Vachok/events{/privacy}","received_events_url":"https://api.github.com/users/Vachok/received_events","type":"User","site_admin":false},"repo":{"id":112817441,"name":"Java_Lessons","full_name":"Vachok/Java_Lessons","owner":{"login":"Vachok","id":33656095,"avatar_url":"https://avatars2.githubusercontent.com/u/33656095?v=4","gravatar_id":"","url":"https://api.github.com/users/Vachok","html_url":"https://github.com/Vachok","followers_url":"https://api.github.com/users/Vachok/followers","following_url":"https://api.github.com/users/Vachok/following{/other_user}","gists_url":"https://api.github.com/users/Vachok/gists{/gist_id}","starred_url":"https://api.github.com/users/Vachok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vachok/subscriptions","organizations_url":"https://api.github.com/users/Vachok/orgs","repos_url":"https://api.github.com/users/Vachok/repos","events_url":"https://api.github.com/users/Vachok/events{/privacy}","received_events_url":"https://api.github.com/users/Vachok/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Vachok/Java_Lessons","description":"by https://www.youtube.com/playlist?list=PL786bPIlqEjRDXpAKYbzpdTaOYsWyjtCX","fork":false,"url":"https://api.github.com/repos/Vachok/Java_Lessons","forks_url":"https://api.github.com/repos/Vachok/Java_Lessons/forks","keys_url":"https://api.github.com/repos/Vachok/Java_Lessons/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Vachok/Java_Lessons/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Vachok/Java_Lessons/teams","hooks_url":"https://api.github.com/repos/Vachok/Java_Lessons/hooks","issue_events_url":"https://api.github.com/repos/Vachok/Java_Lessons/issues/events{/number}","events_url":"https://api.github.com/repos/Vachok/Java_Lessons/events","assignees_url":"https://api.github.com/repos/Vachok/Java_Lessons/assignees{/user}","branches_url":"https://api.github.com/repos/Vachok/Java_Lessons/branches{/branch}","tags_url":"https://api.github.com/repos/Vachok/Java_Lessons/tags","blobs_url":"https://api.github.com/repos/Vachok/Java_Lessons/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Vachok/Java_Lessons/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Vachok/Java_Lessons/git/refs{/sha}","trees_url":"https://api.github.com/repos/Vachok/Java_Lessons/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Vachok/Java_Lessons/statuses/{sha}","languages_url":"https://api.github.com/repos/Vachok/Java_Lessons/languages","stargazers_url":"https://api.github.com/repos/Vachok/Java_Lessons/stargazers","contributors_url":"https://api.github.com/repos/Vachok/Java_Lessons/contributors","subscribers_url":"https://api.github.com/repos/Vachok/Java_Lessons/subscribers","subscription_url":"https://api.github.com/repos/Vachok/Java_Lessons/subscription","commits_url":"https://api.github.com/repos/Vachok/Java_Lessons/commits{/sha}","git_commits_url":"https://api.github.com/repos/Vachok/Java_Lessons/git/commits{/sha}","comments_url":"https://api.github.com/repos/Vachok/Java_Lessons/comments{/number}","issue_comment_url":"https://api.github.com/repos/Vachok/Java_Lessons/issues/comments{/number}","contents_url":"https://api.github.com/repos/Vachok/Java_Lessons/contents/{+path}","compare_url":"https://api.github.com/repos/Vachok/Java_Lessons/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Vachok/Java_Lessons/merges","archive_url":"https://api.github.com/repos/Vachok/Java_Lessons/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Vachok/Java_Lessons/downloads","issues_url":"https://api.github.com/repos/Vachok/Java_Lessons/issues{/number}","pulls_url":"https://api.github.com/repos/Vachok/Java_Lessons/pulls{/number}","milestones_url":"https://api.github.com/repos/Vachok/Java_Lessons/milestones{/number}","notifications_url":"https://api.github.com/repos/Vachok/Java_Lessons/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Vachok/Java_Lessons/labels{/name}","releases_url":"https://api.github.com/repos/Vachok/Java_Lessons/releases{/id}","deployments_url":"https://api.github.com/repos/Vachok/Java_Lessons/deployments","created_at":"2017-12-02T06:05:04Z","updated_at":"2017-12-20T22:51:56Z","pushed_at":"2017-12-26T12:39:24Z","git_url":"git://github.com/Vachok/Java_Lessons.git","ssh_url":"git@github.com:Vachok/Java_Lessons.git","clone_url":"https://github.com/Vachok/Java_Lessons.git","svn_url":"https://github.com/Vachok/Java_Lessons","homepage":null,"size":607,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":13,"license":{"key":"unlicense","name":"The Unlicense","spdx_id":"Unlicense","url":"https://api.github.com/licenses/unlicense"},"forks":0,"open_issues":13,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Vachok/Java_Lessons/pulls/204"},"html":{"href":"https://github.com/Vachok/Java_Lessons/pull/204"},"issue":{"href":"https://api.github.com/repos/Vachok/Java_Lessons/issues/204"},"comments":{"href":"https://api.github.com/repos/Vachok/Java_Lessons/issues/204/comments"},"review_comments":{"href":"https://api.github.com/repos/Vachok/Java_Lessons/pulls/204/comments"},"review_comment":{"href":"https://api.github.com/repos/Vachok/Java_Lessons/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Vachok/Java_Lessons/pulls/204/commits"},"statuses":{"href":"https://api.github.com/repos/Vachok/Java_Lessons/statuses/deedf846124e8390bc2b1afa725d9ff32f291d86"}},"author_association":"OWNER"}}
{"actor":{"display_login":"Vachok"}}