Posted by
Michael Schmid on
Jan 05, 2018; 3:12pm
URL: http://imagej.273.s1.nabble.com/Fn-Shortcut-keys-requires-control-key-they-should-not-tp5019772p5019830.html
Hi Stein, Wayne, and everyone,
just for information:
On my German keyboard, the Numpad-, key (which is at the position of the
Numpad-. of English/US keyboards) sends key code 109=VK_SEPARATOR. For
English/US keyboards, it is 110=VK_DECIMAL.
(In ImageJ, one can easily check with Edit>Options>Misc>Debug Mode).
Yes, it would be nice to map the VK_SEPARATOR to VK_DECIMAL...
---
By the way, speaking of shortcuts, a long-time wish of mine is having
the Delete (delete-right, VK_DELETE=127) for TextPanels (maybe also for
images) working like the backspace (delete-left, VK_BACK_SPACE=8).
In non-Mac environments, one gets used to using the Delete(right) key
for deleting. The backspace is often reserved to text. So I always try
to use the delete-right for deleting lines in the Log, ResultsTables, etc.
(the code is in ImageJ.java:480)
Michael
________________________________________________________________
On 04/01/2018 14:27, Stein Rørvik wrote:
> Thank you Wayne for this fix; it works as intended.
>
> Regarding the fact that I could not get the numpad '.' shortcut to work at all: I can now confirm that this is a regional keyboard issue. I tested the macro in our CT lab where the PC has an UK keyboard and there the shortcut works, but only with the control key down. Perhaps you should apply whatever change you did to get the numpad '/' and '*' keys to work to the numpad '.' as well, for consistency? I assume this problem will apply to US keyboard users as well. Or is there any other compatibility related reason you did not apply the fix to the numpad '.' key?
>
> Stein
>
> -----Original Message-----
> From: ImageJ Interest Group [mailto:
[hidden email]] On Behalf Of Wayne Rasband
> Sent: 28. desember 2017 18:20
> To:
[hidden email]
> Subject: Re: Fn Shortcut keys requires control key, they should not
>
>> On Dec 20, 2017, at 4:01 AM, Stein Rørvik <
[hidden email]> wrote:
>>
> ...
>>
>> For the numeric pad, whether or not the given macro shortcut key requires a control press varies from key to key. The + and - keys work without control, but not * or / or any of the number keys. This is quite inconsistent behaviour. The numeric period does not work at all for me but that could be a keyboard issue since I am in Europe and the period key maps to comma by default here.
>
> In the latest ImageJ daily build (1.51t19), function key and numeric keypad macro shortcuts should work as expected when "Require control key for shortcuts” is enabled. The numeric keypad period key problem is not fixed.
>
> -wayne
>
>> Here is a test macro to illustrate the current behaviour:
>>
>> macro "F1 [f1]" {print("F1");} //requires ctrl
>> macro "Numeric Pad 0 [n0]" { print("npad 0"); } //requires ctrl
>> macro "Numeric Pad 9 [n9]" { print("npad 9"); } //requires ctrl
>> macro "Numeric Pad / [n/]" { print("npad /"); } //requires ctrl
>> macro "Numeric Pad * [n*]" { print("npad *"); } //requires ctrl
>> macro "Numeric Pad - [n-]" { print("npad -"); } //ok
>> macro "Numeric Pad + [n+]" { print("npad +"); } //ok
>> macro "Numeric Pad . [n.]" { print("npad ."); } //does not work at all
>>
>> I am using daily build ImageJ 1.51s with Java 1.6 on Windows 7/64-bit.
>> I don't know if this behaviour happens on Linux and MacOS too?
>> Is this a bug or a limitation of the way the keyboard is mapped in Windows?
>>
>> Stein
>>
>>
>> --
>> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html