From b80be50268f534e215d36d69b93d3f51d9410ace Mon Sep 17 00:00:00 2001 From: Niklas Johansson Date: Thu, 1 Oct 2015 14:22:21 +0200 Subject: Allow non ASCII chars as accelerator keys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Non ASCII characters like åäö can be used as accelerator keys (Alt+). This already works however at the moment it is not exposed properly to accessibility tools such as screen readers. After this patch at least NVDA gets information about accelerator keys that are non ascii. On Linux we need to adapt code in vcl/unx/atk/a11y/atkaction.cxx. There is also vcl/source/window/dlgctrl.cxx#Window::GetActivationKey should probably have similar treatment and I guess that it is related to accelerator keys in dialogs but I need to confirm that. I'm a bit unsure how to best do that so I'll save it for later. Change-Id: I1f1509a26d781011d217670266bd10b2107811d5 Reviewed-on: https://gerrit.libreoffice.org/19078 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- vcl/source/window/menu.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vcl') diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 2505afa94939..34804c1a3555 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -862,8 +862,8 @@ KeyEvent Menu::GetActivationKey( sal_uInt16 nItemId ) const nCode = KEY_A + (cAccel-'A'); else if( cAccel >= '0' && cAccel <= '9' ) nCode = KEY_0 + (cAccel-'0'); - if(nCode ) - aRet = KeyEvent( cAccel, KeyCode( nCode, KEY_MOD2 ) ); + + aRet = KeyEvent( cAccel, KeyCode( nCode, KEY_MOD2 ) ); } } -- cgit