{"action":"created","issue":{"url":"https://api.github.com/repos/Exho1/gPhone/issues/9","labels_url":"https://api.github.com/repos/Exho1/gPhone/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/Exho1/gPhone/issues/9/comments","events_url":"https://api.github.com/repos/Exho1/gPhone/issues/9/events","html_url":"https://github.com/Exho1/gPhone/issues/9","id":62522471,"number":9,"title":"gPhone can activate while typing in chatbox/console","user":{"login":"MattJeanes","id":2363642,"avatar_url":"https://avatars.githubusercontent.com/u/2363642?v=3","gravatar_id":"","url":"https://api.github.com/users/MattJeanes","html_url":"https://github.com/MattJeanes","followers_url":"https://api.github.com/users/MattJeanes/followers","following_url":"https://api.github.com/users/MattJeanes/following{/other_user}","gists_url":"https://api.github.com/users/MattJeanes/gists{/gist_id}","starred_url":"https://api.github.com/users/MattJeanes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MattJeanes/subscriptions","organizations_url":"https://api.github.com/users/MattJeanes/orgs","repos_url":"https://api.github.com/users/MattJeanes/repos","events_url":"https://api.github.com/users/MattJeanes/events{/privacy}","received_events_url":"https://api.github.com/users/MattJeanes/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-17T21:28:09Z","updated_at":"2015-04-07T01:14:05Z","closed_at":"2015-04-07T00:48:31Z","body":"If you hold the key down for the time while typing in the chat-box it will activate. This is mainly a problem for people who use very low key hold times, such as 0."},"comment":{"url":"https://api.github.com/repos/Exho1/gPhone/issues/comments/90303071","html_url":"https://github.com/Exho1/gPhone/issues/9#issuecomment-90303071","issue_url":"https://api.github.com/repos/Exho1/gPhone/issues/9","id":90303071,"user":{"login":"Exho1","id":8472757,"avatar_url":"https://avatars.githubusercontent.com/u/8472757?v=3","gravatar_id":"","url":"https://api.github.com/users/Exho1","html_url":"https://github.com/Exho1","followers_url":"https://api.github.com/users/Exho1/followers","following_url":"https://api.github.com/users/Exho1/following{/other_user}","gists_url":"https://api.github.com/users/Exho1/gists{/gist_id}","starred_url":"https://api.github.com/users/Exho1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Exho1/subscriptions","organizations_url":"https://api.github.com/users/Exho1/orgs","repos_url":"https://api.github.com/users/Exho1/repos","events_url":"https://api.github.com/users/Exho1/events{/privacy}","received_events_url":"https://api.github.com/users/Exho1/received_events","type":"User","site_admin":false},"created_at":"2015-04-07T01:14:05Z","updated_at":"2015-04-07T01:14:05Z","body":"I found two functions for checking if the console or main menu was open and then just set a boolean based on opening and closing the chat.\r\n\r\nlocal canOpenPhone = true\r\nhook.Add( \"Think\", \"gPhone_openAndCloseKey\", function()\r\n\t-- Prevents the phone from being opened while chatting, in console, or in the main menu\r\n\tif not canOpenPhone or gui.IsConsoleVisible() or gui.IsGameUIVisible() then return end\r\n\t\r\n\t-- snip code\r\nend)\r\n\r\nhook.Add(\"StartChat\", \"gPhone_liveAndLetChat\", function()\r\n\tcanOpenPhone = false\r\nend)\r\n\r\nhook.Add(\"FinishChat\", \"gPhone_weDoneChatting\", function()\r\n\tcanOpenPhone = true\r\nend)"}}