{"thread":{"id":"31691","subject":"gitk: can't reload commits with new key binding","startedAt":"2012-09-30T10:19:32Z","lastAt":"2012-10-21T22:19:01Z","messageCount":11,"participants":["SZEDER Gábor","Andrew Wong","Junio C Hamano","Paul Mackerras"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"200212","messageId":"20120930101932.GA15672@goldbirke","threadId":"31691","inReplyTo":null,"subject":"gitk: can't reload commits with new key binding","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2012-09-30T10:19:32Z","receivedAt":"2012-09-30T10:19:32Z","isPatch":false,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"Hi,\n\na135f214 (gitk: Avoid Meta1-F5, 2012-04-07) changed the key binding\nfor reloading commits to shift-F5, but this new key binding doesn't\nseem to be working here, because it doesn't call reloadcommits().\nChoosing the reload menu item works.  Shift-F5 works properly in other\napplications.\n\nAny ideas?\n\nThanks,\nGábor\n"},{"id":"200262","messageId":"1349105191-31681-1-git-send-email-andrew.kw.w@gmail.com","threadId":"31691","inReplyTo":"20120930101932.GA15672@goldbirke","subject":"Re: gitk: can't reload commits with new key binding","fromName":"Andrew Wong","fromEmail":"andrew.kw.w@gmail.com","sentAt":"2012-10-01T15:26:30Z","receivedAt":"2012-10-01T15:26:30Z","isPatch":false,"sender":{"key":"andrew.kw.w@gmail.com","avatar":"https://avatars.githubusercontent.com/u/489311?v=4"},"body":"Sorry, my previous \"git send-email\" screwed up. Resending the email again.\n\nI was running into the same issue too. It turns out that on some machines\nShift-F5 is mapped to Shift-XF86_Switch_VT_5. My patch includes a workaround.\nThe same workaround was used for Shift-F4.\n\nAndrew Wong (1):\n  gitk: Add workaround for system where Shift-F5 mapped to\n    Shift-XF86_Switch_VT_5\n\n gitk-git/gitk | 1 +\n 1 file changed, 1 insertion(+)\n\n-- \n1.7.12.1.382.gb0576a6\n"},{"id":"200263","messageId":"1349105191-31681-2-git-send-email-andrew.kw.w@gmail.com","threadId":"31691","inReplyTo":"1349105191-31681-1-git-send-email-andrew.kw.w@gmail.com","subject":"[PATCH] gitk: Add workaround for system where Shift-F5 mapped to Shift-XF86_Switch_VT_5","fromName":"Andrew Wong","fromEmail":"andrew.kw.w@gmail.com","sentAt":"2012-10-01T15:26:31Z","receivedAt":"2012-10-01T15:26:31Z","isPatch":true,"sender":{"key":"andrew.kw.w@gmail.com","avatar":"https://avatars.githubusercontent.com/u/489311?v=4"},"body":"The same workaround was used for Shift-F4 in:\n  cea07cf8dc9b3677e0c50433c0d72bce83adbdc7\n\nSigned-off-by: Andrew Wong <andrew.kw.w@gmail.com>\n---\n gitk-git/gitk | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/gitk-git/gitk b/gitk-git/gitk\nindex d93bd99..698b84a 100755\n--- a/gitk-git/gitk\n+++ b/gitk-git/gitk\n@@ -2496,6 +2496,7 @@ proc makewindow {} {\n     bindkey f nextfile\n     bind . <F5> updatecommits\n     bind . <Shift-F5> reloadcommits\n+    catch { bind . <Shift-Key-XF86_Switch_VT_5> reloadcommits }\n     bind . <F2> showrefs\n     bind . <Shift-F4> {newview 0}\n     catch { bind . <Shift-Key-XF86_Switch_VT_4> {newview 0} }\n-- \n1.7.12.1.382.gb0576a6\n"},{"id":"200272","messageId":"7vwqzacdb7.fsf@alter.siamese.dyndns.org","threadId":"31691","inReplyTo":"1349105191-31681-2-git-send-email-andrew.kw.w@gmail.com","subject":"Re: [PATCH] gitk: Add workaround for system where Shift-F5 mapped to Shift-XF86_Switch_VT_5","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-10-01T17:27:56Z","receivedAt":"2012-10-01T17:27:56Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andrew Wong <andrew.kw.w@gmail.com> writes:\n\n> The same workaround was used for Shift-F4 in:\n>   cea07cf8dc9b3677e0c50433c0d72bce83adbdc7\n>\n> Signed-off-by: Andrew Wong <andrew.kw.w@gmail.com>\n> ---\n>  gitk-git/gitk | 1 +\n>  1 file changed, 1 insertion(+)\n>\n> diff --git a/gitk-git/gitk b/gitk-git/gitk\n> index d93bd99..698b84a 100755\n> --- a/gitk-git/gitk\n> +++ b/gitk-git/gitk\n> @@ -2496,6 +2496,7 @@ proc makewindow {} {\n>      bindkey f nextfile\n>      bind . <F5> updatecommits\n>      bind . <Shift-F5> reloadcommits\n> +    catch { bind . <Shift-Key-XF86_Switch_VT_5> reloadcommits }\n>      bind . <F2> showrefs\n>      bind . <Shift-F4> {newview 0}\n>      catch { bind . <Shift-Key-XF86_Switch_VT_4> {newview 0} }\n\nWouldn't it make more sense to have a small helper function to wrap\nbinding both <Shift-Fn> and <Shift-Key-XF86_Switch_VT_n> to the same\nthing and have F4 and F5 binding use that to avoid repetition?\n"},{"id":"200324","messageId":"1349190285-7788-1-git-send-email-andrew.kw.w@gmail.com","threadId":"31691","inReplyTo":"7vwqzacdb7.fsf@alter.siamese.dyndns.org","subject":"[PATCH v2 0/2] Re: gitk: can't reload commits with new key binding","fromName":"Andrew Wong","fromEmail":"andrew.kw.w@gmail.com","sentAt":"2012-10-02T15:04:43Z","receivedAt":"2012-10-02T15:04:43Z","isPatch":true,"sender":{"key":"andrew.kw.w@gmail.com","avatar":"https://avatars.githubusercontent.com/u/489311?v=4"},"body":"Refactored the code for binding modified function keys as Junio suggested.\n\nAndrew Wong (2):\n  gitk: Refactor code for binding modified function keys\n  gitk: Use bindshiftfunctionkey to bind Shift-F5\n\n gitk | 10 +++++++---\n 1 file changed, 7 insertions(+), 3 deletions(-)\n\n-- \n1.7.12.1.382.gb0576a6\n"},{"id":"200325","messageId":"1349190285-7788-2-git-send-email-andrew.kw.w@gmail.com","threadId":"31691","inReplyTo":"1349190285-7788-1-git-send-email-andrew.kw.w@gmail.com","subject":"[PATCH v2 1/2] gitk: Refactor code for binding modified function keys","fromName":"Andrew Wong","fromEmail":"andrew.kw.w@gmail.com","sentAt":"2012-10-02T15:04:44Z","receivedAt":"2012-10-02T15:04:44Z","isPatch":true,"sender":{"key":"andrew.kw.w@gmail.com","avatar":"https://avatars.githubusercontent.com/u/489311?v=4"},"body":"The function includes a workaround for systems where F* keys are mapped\nto XF86_Switch_VT_* when modifiers are used.\n\nSigned-off-by: Andrew Wong <andrew.kw.w@gmail.com>\n---\n gitk | 8 ++++++--\n 1 file changed, 6 insertions(+), 2 deletions(-)\n\ndiff --git a/gitk b/gitk\nindex 379582a..f8f89a5 100755\n--- a/gitk\n+++ b/gitk\n@@ -2503,8 +2503,7 @@ proc makewindow {} {\n     bind . <F5> updatecommits\n     bind . <Shift-F5> reloadcommits\n     bind . <F2> showrefs\n-    bind . <Shift-F4> {newview 0}\n-    catch { bind . <Shift-Key-XF86_Switch_VT_4> {newview 0} }\n+    bindmodfunctionkey Shift 4 {newview 0}\n     bind . <F4> edit_or_newview\n     bind . <$M1B-q> doquit\n     bind . <$M1B-f> {dofind 1 1}\n@@ -2653,6 +2652,11 @@ proc bindkey {ev script} {\n     }\n }\n \n+proc bindmodfunctionkey {mod n script} {\n+    bind . <$mod-F$n> $script\n+    catch { bind . <$mod-XF86_Switch_VT_$n> $script }\n+}\n+\n # set the focus back to the toplevel for any click outside\n # the entry widgets\n proc click {w} {\n-- \n1.7.12.1.382.gb0576a6\n"},{"id":"200326","messageId":"1349190285-7788-3-git-send-email-andrew.kw.w@gmail.com","threadId":"31691","inReplyTo":"1349190285-7788-1-git-send-email-andrew.kw.w@gmail.com","subject":"[PATCH v2 2/2] gitk: Use bindshiftfunctionkey to bind Shift-F5","fromName":"Andrew Wong","fromEmail":"andrew.kw.w@gmail.com","sentAt":"2012-10-02T15:04:45Z","receivedAt":"2012-10-02T15:04:45Z","isPatch":true,"sender":{"key":"andrew.kw.w@gmail.com","avatar":"https://avatars.githubusercontent.com/u/489311?v=4"},"body":"Signed-off-by: Andrew Wong <andrew.kw.w@gmail.com>\n---\n gitk | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/gitk b/gitk\nindex f8f89a5..d53fdb2 100755\n--- a/gitk\n+++ b/gitk\n@@ -2501,7 +2501,7 @@ proc makewindow {} {\n     bindkey ? {dofind -1 1}\n     bindkey f nextfile\n     bind . <F5> updatecommits\n-    bind . <Shift-F5> reloadcommits\n+    bindmodfunctionkey Shift 5 reloadcommits\n     bind . <F2> showrefs\n     bindmodfunctionkey Shift 4 {newview 0}\n     bind . <F4> edit_or_newview\n-- \n1.7.12.1.382.gb0576a6\n"},{"id":"200716","messageId":"5071F1A3.5070502@gmail.com","threadId":"31691","inReplyTo":"1349190285-7788-1-git-send-email-andrew.kw.w@gmail.com","subject":"Re: [PATCH v2 0/2] Re: gitk: can't reload commits with new key binding","fromName":"Andrew Wong","fromEmail":"andrew.kw.w@gmail.com","sentAt":"2012-10-07T21:18:27Z","receivedAt":"2012-10-07T21:18:27Z","isPatch":true,"sender":{"key":"andrew.kw.w@gmail.com","avatar":"https://avatars.githubusercontent.com/u/489311?v=4"},"body":"Could we look into getting this patch into git/gitk?\n\nOn 10/02/12 11:04, Andrew Wong wrote:\n> Refactored the code for binding modified function keys as Junio suggested.\n>\n> Andrew Wong (2):\n>   gitk: Refactor code for binding modified function keys\n>   gitk: Use bindshiftfunctionkey to bind Shift-F5\n>\n>  gitk | 10 +++++++---\n>  1 file changed, 7 insertions(+), 3 deletions(-)\n>\n"},{"id":"200787","messageId":"20121008210555.GM951@goldbirke","threadId":"31691","inReplyTo":"1349190285-7788-1-git-send-email-andrew.kw.w@gmail.com","subject":"Re: [PATCH v2 0/2] Re: gitk: can't reload commits with new key binding","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2012-10-08T21:05:55Z","receivedAt":"2012-10-08T21:05:55Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"Hi,\n\n(Sorry for the delayed reply, was out of town.)\n\n\nOn Tue, Oct 02, 2012 at 11:04:43AM -0400, Andrew Wong wrote:\n> Refactored the code for binding modified function keys as Junio suggested.\n> \n> Andrew Wong (2):\n>   gitk: Refactor code for binding modified function keys\n>   gitk: Use bindshiftfunctionkey to bind Shift-F5\n> \n\nThanks, this series solves the problem for me.\n\n\nBest,\nGábor\n"},{"id":"201056","messageId":"50782671.9010603@gmail.com","threadId":"31691","inReplyTo":"1349190285-7788-1-git-send-email-andrew.kw.w@gmail.com","subject":"Re: [PATCH v2 0/2] Re: gitk: can't reload commits with new key binding","fromName":"Andrew Wong","fromEmail":"andrew.kw.w@gmail.com","sentAt":"2012-10-12T14:17:21Z","receivedAt":"2012-10-12T14:17:21Z","isPatch":true,"sender":{"key":"andrew.kw.w@gmail.com","avatar":"https://avatars.githubusercontent.com/u/489311?v=4"},"body":"Can I get some feedback on these two patches? It'd be great to have them \nmerged into gitk. Thanks.\n\n\nOn 10/02/2012 11:04 AM, Andrew Wong wrote:\n> Refactored the code for binding modified function keys as Junio suggested.\n>\n> Andrew Wong (2):\n>    gitk: Refactor code for binding modified function keys\n>    gitk: Use bindshiftfunctionkey to bind Shift-F5\n>\n>   gitk | 10 +++++++---\n>   1 file changed, 7 insertions(+), 3 deletions(-)\n>\n"},{"id":"201666","messageId":"20121021221901.GA7407@bloggs.ozlabs.ibm.com","threadId":"31691","inReplyTo":"1349190285-7788-1-git-send-email-andrew.kw.w@gmail.com","subject":"Re: [PATCH v2 0/2] Re: gitk: can't reload commits with new key binding","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2012-10-21T22:19:01Z","receivedAt":"2012-10-21T22:19:01Z","isPatch":true,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"On Tue, Oct 02, 2012 at 11:04:43AM -0400, Andrew Wong wrote:\n> Refactored the code for binding modified function keys as Junio suggested.\n> \n> Andrew Wong (2):\n>   gitk: Refactor code for binding modified function keys\n>   gitk: Use bindshiftfunctionkey to bind Shift-F5\n> \n>  gitk | 10 +++++++---\n>  1 file changed, 7 insertions(+), 3 deletions(-)\n\nThanks, applied both patches.\n\nPaul.\n"}]}