[Libreoffice-commits] .: vcl/unx vcl/win
Kohei Yoshida
kohei at kemper.freedesktop.org
Mon Feb 14 12:34:56 PST 2011
vcl/unx/source/app/saldisp.cxx | 15 ++++++++++++---
vcl/win/source/window/salframe.cxx | 9 +++++++++
2 files changed, 21 insertions(+), 3 deletions(-)
New commits:
commit 49d7d62a0236e99f518c7e7c032f1b277cb53b5a
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Mon Feb 14 15:31:09 2011 -0500
Correctly display shortcut keys for ';' '[' and ']'. (fdo#32891)
In the keyboard shortcut customization dialog....
On Linux, It's better to use Ctrl+;, Ctrl+[ and Ctrl+] than
Ctrl+semicolon, Ctrl+bracketleft, Ctrl+bracketright, respectively.
On Windows, these key names were empty.
diff --git a/vcl/unx/source/app/saldisp.cxx b/vcl/unx/source/app/saldisp.cxx
index 1dbcfaf..b5f9aaa 100644
--- a/vcl/unx/source/app/saldisp.cxx
+++ b/vcl/unx/source/app/saldisp.cxx
@@ -1182,6 +1182,7 @@ void SalDisplay::ModifierMapping()
XubString SalDisplay::GetKeyName( USHORT nKeyCode ) const
{
String aStrMap;
+ String aCustomKeyName;
if( nKeyCode & KEY_MOD1 )
aStrMap += GetKeyNameFromKeySym( nCtrlKeySym_ );
@@ -1334,13 +1335,13 @@ XubString SalDisplay::GetKeyName( USHORT nKeyCode ) const
nKeySym = XK_grave;
break;
case KEY_BRACKETLEFT:
- nKeySym = XK_bracketleft;
+ aCustomKeyName = '[';
break;
case KEY_BRACKETRIGHT:
- nKeySym = XK_bracketright;
+ aCustomKeyName = ']';
break;
case KEY_SEMICOLON:
- nKeySym = XK_semicolon;
+ aCustomKeyName = ';';
break;
default:
@@ -1360,6 +1361,14 @@ XubString SalDisplay::GetKeyName( USHORT nKeyCode ) const
else
aStrMap.Erase();
}
+ else if (aCustomKeyName.Len())
+ {
+ // For semicolumn, bracket left and bracket right, it's better to use
+ // their keys than their names. (fdo#32891)
+ if (aStrMap.Len())
+ aStrMap += '+';
+ aStrMap += aCustomKeyName;
+ }
else
aStrMap.Erase();
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index 833fd2d..169cad4 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -2687,6 +2687,15 @@ XubString WinSalFrame::GetKeyName( USHORT nKeyCode )
case KEY_EQUAL:
cSVCode = '=';
break;
+ case KEY_SEMICOLON:
+ cSVCode = ';';
+ break;
+ case KEY_BRACKETLEFT:
+ cSVCode = '[';
+ break;
+ case KEY_BRACKETRIGHT:
+ cSVCode = ']';
+ break;
}
}
More information about the Libreoffice-commits
mailing list