Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi,

See the attached patch. Motivation:

17:51 < boobaa> kohei: is there a way to bind F13/F15 to previous/next sheet in calc?
17:58 <@kohei> boobaa, no idea.  did you look into View - Toolbars - Customize - Keyboard?
17:58 < boobaa> kohei: exactly
17:59 <@kohei> boobaa, if it's not there, then the answer will be 'no'.
18:01 < boobaa> kohei: ok, let me rephrase. how difficult to implement this? :)
18:02 <@kohei> boobaa, this is a bit tricky, since ctrl-pageup pagedown have special handling in 
vcl not tied to key bindings.
18:02 <@kohei> boobaa, oh wait, I may be talking about shift-pageup/down.
18:03 < boobaa> kohei: well, from my user point of view all i'm missing is the f13 and f15 from the 
available keys' list. everything else is there already.
18:05 <@kohei> boobaa, then it should be fairly simple I think.  Just add F13 and up as bindable 
keys in vcl, and modify the key binding pane in somewhere in svx/svtools/svl is all you'd need to 
do, I think.
18:05  * kohei forgets exactly how to add new keys.

The patch is pretty trivial once it turned out vcl already supports up
to F24 (and at some places F26), but what I can test is F13-F16, so I
enabled only that.

OK to push to master?
From 0eaa09f032b71f5ffc7369f8ecf841a8f8c41e99 Mon Sep 17 00:00:00 2001
From: Miklos Vajna <vmiklos@frugalware.org>
Date: Sat, 8 Jan 2011 15:44:50 +0100
Subject: [PATCH] cui: make it possible to bind F13/F14/F15/F16 to a function

---
 cui/source/customize/acccfg.cxx |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index 9460c9d..20a92b0 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -127,6 +127,10 @@ static USHORT KEYCODE_ARRAY[] =
     KEY_F10      ,
     KEY_F11      ,
     KEY_F12      ,
+    KEY_F13      ,
+    KEY_F14      ,
+    KEY_F15      ,
+    KEY_F16      ,
 
     KEY_DOWN     ,
     KEY_UP       ,
@@ -167,6 +171,10 @@ static USHORT KEYCODE_ARRAY[] =
     KEY_F10       | KEY_SHIFT,
     KEY_F11       | KEY_SHIFT,
     KEY_F12       | KEY_SHIFT,
+    KEY_F13       | KEY_SHIFT,
+    KEY_F14       | KEY_SHIFT,
+    KEY_F15       | KEY_SHIFT,
+    KEY_F16       | KEY_SHIFT,
 
     KEY_DOWN      | KEY_SHIFT,
     KEY_UP        | KEY_SHIFT,
@@ -235,6 +243,10 @@ static USHORT KEYCODE_ARRAY[] =
     KEY_F10       | KEY_MOD1 ,
     KEY_F11       | KEY_MOD1 ,
     KEY_F12       | KEY_MOD1 ,
+    KEY_F13       | KEY_MOD1 ,
+    KEY_F14       | KEY_MOD1 ,
+    KEY_F15       | KEY_MOD1 ,
+    KEY_F16       | KEY_MOD1 ,
 
     KEY_DOWN      | KEY_MOD1 ,
     KEY_UP        | KEY_MOD1 ,
@@ -307,6 +319,10 @@ static USHORT KEYCODE_ARRAY[] =
     KEY_F10       | KEY_SHIFT | KEY_MOD1,
     KEY_F11       | KEY_SHIFT | KEY_MOD1,
     KEY_F12       | KEY_SHIFT | KEY_MOD1,
+    KEY_F13       | KEY_SHIFT | KEY_MOD1,
+    KEY_F14       | KEY_SHIFT | KEY_MOD1,
+    KEY_F15       | KEY_SHIFT | KEY_MOD1,
+    KEY_F16       | KEY_SHIFT | KEY_MOD1,
 
     KEY_DOWN      | KEY_SHIFT | KEY_MOD1,
     KEY_UP        | KEY_SHIFT | KEY_MOD1,
@@ -374,6 +390,10 @@ static USHORT KEYCODE_ARRAY[] =
     KEY_F10       | KEY_MOD2 ,
     KEY_F11       | KEY_MOD2 ,
     KEY_F12       | KEY_MOD2 ,
+    KEY_F13       | KEY_MOD2 ,
+    KEY_F14       | KEY_MOD2 ,
+    KEY_F15       | KEY_MOD2 ,
+    KEY_F16       | KEY_MOD2 ,
 
     KEY_DOWN      | KEY_MOD2 ,
     KEY_UP        | KEY_MOD2 ,
@@ -441,6 +461,10 @@ static USHORT KEYCODE_ARRAY[] =
     KEY_F10       | KEY_SHIFT | KEY_MOD2,
     KEY_F11       | KEY_SHIFT | KEY_MOD2,
     KEY_F12       | KEY_SHIFT | KEY_MOD2,
+    KEY_F13       | KEY_SHIFT | KEY_MOD2,
+    KEY_F14       | KEY_SHIFT | KEY_MOD2,
+    KEY_F15       | KEY_SHIFT | KEY_MOD2,
+    KEY_F16       | KEY_SHIFT | KEY_MOD2,
 
     KEY_DOWN      | KEY_SHIFT | KEY_MOD2,
     KEY_UP        | KEY_SHIFT | KEY_MOD2,
@@ -505,6 +529,10 @@ static USHORT KEYCODE_ARRAY[] =
     KEY_F10       | KEY_MOD1 | KEY_MOD2 ,
     KEY_F11       | KEY_MOD1 | KEY_MOD2 ,
     KEY_F12       | KEY_MOD1 | KEY_MOD2 ,
+    KEY_F13       | KEY_MOD1 | KEY_MOD2 ,
+    KEY_F14       | KEY_MOD1 | KEY_MOD2 ,
+    KEY_F15       | KEY_MOD1 | KEY_MOD2 ,
+    KEY_F16       | KEY_MOD1 | KEY_MOD2 ,
 
     KEY_DOWN      | KEY_MOD1 | KEY_MOD2 ,
     KEY_UP        | KEY_MOD1 | KEY_MOD2 ,
@@ -572,6 +600,10 @@ static USHORT KEYCODE_ARRAY[] =
     KEY_F10       | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
     KEY_F11       | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
     KEY_F12       | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+    KEY_F13       | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+    KEY_F14       | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+    KEY_F15       | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
+    KEY_F16       | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
 
     KEY_DOWN      | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
     KEY_UP        | KEY_SHIFT | KEY_MOD1 | KEY_MOD2,
-- 
1.7.3.4

Attachment: pgphsSEagBqhr.pgp
Description: PGP signature


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.