summaryrefslogtreecommitdiff
path: root/vcl/qt5
diff options
context:
space:
mode:
authorGökay Şatır <gokaysatir@collabora.com>2023-10-04 15:01:38 +0300
committerCaolán McNamara <caolan.mcnamara@collabora.com>2023-10-14 21:51:43 +0200
commitca74511985981444dbd72ade7244484c131e36a7 (patch)
tree18650e2ccf975fa0825f2c42e3c24b523c5ae012 /vcl/qt5
parent025372363e5310ffe0e729648f97faef2fe784eb (diff)
Add NUMBERSIGN key handler.
German keyboard layout has number sign key. Users can print number sign without using modification keys. So this key can be assigned a shortcut. Subscript is assigned to CTRL + NUMBERSIGN. Below PR is used as reference when adding the new key handler: https://gerrit.libreoffice.org/c/core/+/86713 Signed-off-by: Gökay Şatır <gokaysatir@collabora.com> Change-Id: I340dc47764e9200d2477f8db740a629f62f48004 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157554 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> (cherry picked from commit 1db8f6d484b884301a7d3673f4d05478e28cd853) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157959 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'vcl/qt5')
-rw-r--r--vcl/qt5/QtFrame.cxx3
-rw-r--r--vcl/qt5/QtWidget.cxx3
2 files changed, 6 insertions, 0 deletions
diff --git a/vcl/qt5/QtFrame.cxx b/vcl/qt5/QtFrame.cxx
index 49d542a64909..f3cc0facfe8a 100644
--- a/vcl/qt5/QtFrame.cxx
+++ b/vcl/qt5/QtFrame.cxx
@@ -992,6 +992,9 @@ OUString QtFrame::GetKeyName(sal_uInt16 nKeyCode)
case KEY_BRACKETRIGHT:
nRetCode = Qt::Key_BracketRight;
break;
+ case KEY_NUMBERSIGN:
+ nRetCode = Qt::Key_NumberSign;
+ break;
case KEY_COLON:
nRetCode = Qt::Key_Colon;
break;
diff --git a/vcl/qt5/QtWidget.cxx b/vcl/qt5/QtWidget.cxx
index 5e7d1d56c464..48c0d22c58fd 100644
--- a/vcl/qt5/QtWidget.cxx
+++ b/vcl/qt5/QtWidget.cxx
@@ -450,6 +450,9 @@ static sal_uInt16 GetKeyCode(int keyval, Qt::KeyboardModifiers modifiers)
case Qt::Key_BracketRight:
nCode = KEY_BRACKETRIGHT;
break;
+ case Qt::Key_NumberSign:
+ nCode = KEY_NUMBERSIGN;
+ break;
case Qt::Key_Colon:
nCode = KEY_COLON;
break;