* [PATCH v2 1/2] gitk: Refactor code for binding modified function keys
2012-10-02 15:04 ` [PATCH v2 0/2] Re: gitk: can't reload commits with new key binding Andrew Wong
@ 2012-10-02 15:04 ` Andrew Wong
2012-10-02 15:04 ` [PATCH v2 2/2] gitk: Use bindshiftfunctionkey to bind Shift-F5 Andrew Wong
` (4 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: Andrew Wong @ 2012-10-02 15:04 UTC (permalink / raw)
To: git; +Cc: gitster, szeder, paulus, Andrew Wong
The function includes a workaround for systems where F* keys are mapped
to XF86_Switch_VT_* when modifiers are used.
Signed-off-by: Andrew Wong <andrew.kw.w@gmail.com>
---
gitk | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/gitk b/gitk
index 379582a..f8f89a5 100755
--- a/gitk
+++ b/gitk
@@ -2503,8 +2503,7 @@ proc makewindow {} {
bind . <F5> updatecommits
bind . <Shift-F5> reloadcommits
bind . <F2> showrefs
- bind . <Shift-F4> {newview 0}
- catch { bind . <Shift-Key-XF86_Switch_VT_4> {newview 0} }
+ bindmodfunctionkey Shift 4 {newview 0}
bind . <F4> edit_or_newview
bind . <$M1B-q> doquit
bind . <$M1B-f> {dofind 1 1}
@@ -2653,6 +2652,11 @@ proc bindkey {ev script} {
}
}
+proc bindmodfunctionkey {mod n script} {
+ bind . <$mod-F$n> $script
+ catch { bind . <$mod-XF86_Switch_VT_$n> $script }
+}
+
# set the focus back to the toplevel for any click outside
# the entry widgets
proc click {w} {
--
1.7.12.1.382.gb0576a6
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v2 2/2] gitk: Use bindshiftfunctionkey to bind Shift-F5
2012-10-02 15:04 ` [PATCH v2 0/2] Re: gitk: can't reload commits with new key binding Andrew Wong
2012-10-02 15:04 ` [PATCH v2 1/2] gitk: Refactor code for binding modified function keys Andrew Wong
@ 2012-10-02 15:04 ` Andrew Wong
2012-10-07 21:18 ` [PATCH v2 0/2] Re: gitk: can't reload commits with new key binding Andrew Wong
` (3 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: Andrew Wong @ 2012-10-02 15:04 UTC (permalink / raw)
To: git; +Cc: gitster, szeder, paulus, Andrew Wong
Signed-off-by: Andrew Wong <andrew.kw.w@gmail.com>
---
gitk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gitk b/gitk
index f8f89a5..d53fdb2 100755
--- a/gitk
+++ b/gitk
@@ -2501,7 +2501,7 @@ proc makewindow {} {
bindkey ? {dofind -1 1}
bindkey f nextfile
bind . <F5> updatecommits
- bind . <Shift-F5> reloadcommits
+ bindmodfunctionkey Shift 5 reloadcommits
bind . <F2> showrefs
bindmodfunctionkey Shift 4 {newview 0}
bind . <F4> edit_or_newview
--
1.7.12.1.382.gb0576a6
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v2 0/2] Re: gitk: can't reload commits with new key binding
2012-10-02 15:04 ` [PATCH v2 0/2] Re: gitk: can't reload commits with new key binding Andrew Wong
2012-10-02 15:04 ` [PATCH v2 1/2] gitk: Refactor code for binding modified function keys Andrew Wong
2012-10-02 15:04 ` [PATCH v2 2/2] gitk: Use bindshiftfunctionkey to bind Shift-F5 Andrew Wong
@ 2012-10-07 21:18 ` Andrew Wong
2012-10-08 21:05 ` SZEDER Gábor
` (2 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: Andrew Wong @ 2012-10-07 21:18 UTC (permalink / raw)
To: Andrew Wong; +Cc: git, gitster, szeder, paulus
Could we look into getting this patch into git/gitk?
On 10/02/12 11:04, Andrew Wong wrote:
> Refactored the code for binding modified function keys as Junio suggested.
>
> Andrew Wong (2):
> gitk: Refactor code for binding modified function keys
> gitk: Use bindshiftfunctionkey to bind Shift-F5
>
> gitk | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 0/2] Re: gitk: can't reload commits with new key binding
2012-10-02 15:04 ` [PATCH v2 0/2] Re: gitk: can't reload commits with new key binding Andrew Wong
` (2 preceding siblings ...)
2012-10-07 21:18 ` [PATCH v2 0/2] Re: gitk: can't reload commits with new key binding Andrew Wong
@ 2012-10-08 21:05 ` SZEDER Gábor
2012-10-12 14:17 ` Andrew Wong
2012-10-21 22:19 ` Paul Mackerras
5 siblings, 0 replies; 11+ messages in thread
From: SZEDER Gábor @ 2012-10-08 21:05 UTC (permalink / raw)
To: Andrew Wong; +Cc: git, gitster, paulus
Hi,
(Sorry for the delayed reply, was out of town.)
On Tue, Oct 02, 2012 at 11:04:43AM -0400, Andrew Wong wrote:
> Refactored the code for binding modified function keys as Junio suggested.
>
> Andrew Wong (2):
> gitk: Refactor code for binding modified function keys
> gitk: Use bindshiftfunctionkey to bind Shift-F5
>
Thanks, this series solves the problem for me.
Best,
Gábor
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 0/2] Re: gitk: can't reload commits with new key binding
2012-10-02 15:04 ` [PATCH v2 0/2] Re: gitk: can't reload commits with new key binding Andrew Wong
` (3 preceding siblings ...)
2012-10-08 21:05 ` SZEDER Gábor
@ 2012-10-12 14:17 ` Andrew Wong
2012-10-21 22:19 ` Paul Mackerras
5 siblings, 0 replies; 11+ messages in thread
From: Andrew Wong @ 2012-10-12 14:17 UTC (permalink / raw)
To: paulus; +Cc: Andrew Wong, Junio C Hamano, szeder, git list
Can I get some feedback on these two patches? It'd be great to have them
merged into gitk. Thanks.
On 10/02/2012 11:04 AM, Andrew Wong wrote:
> Refactored the code for binding modified function keys as Junio suggested.
>
> Andrew Wong (2):
> gitk: Refactor code for binding modified function keys
> gitk: Use bindshiftfunctionkey to bind Shift-F5
>
> gitk | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 0/2] Re: gitk: can't reload commits with new key binding
2012-10-02 15:04 ` [PATCH v2 0/2] Re: gitk: can't reload commits with new key binding Andrew Wong
` (4 preceding siblings ...)
2012-10-12 14:17 ` Andrew Wong
@ 2012-10-21 22:19 ` Paul Mackerras
5 siblings, 0 replies; 11+ messages in thread
From: Paul Mackerras @ 2012-10-21 22:19 UTC (permalink / raw)
To: Andrew Wong; +Cc: git, gitster, szeder
On Tue, Oct 02, 2012 at 11:04:43AM -0400, Andrew Wong wrote:
> Refactored the code for binding modified function keys as Junio suggested.
>
> Andrew Wong (2):
> gitk: Refactor code for binding modified function keys
> gitk: Use bindshiftfunctionkey to bind Shift-F5
>
> gitk | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
Thanks, applied both patches.
Paul.
^ permalink raw reply [flat|nested] 11+ messages in thread