SlickEdit Community
Archived Beta Discussions => SlickEdit 201x Beta Discussions => SlickEdit 2018 v23 Beta Discussion => Topic started by: Graeme on October 20, 2018, 05:41:17 AM
-
The pad star * and pad divide / keys have an event name of just * or /. Is that intentional or is it my keyboard?
I see slick sources looking for pad-star and pad-slash in a few places.
-
Works for me on Windows.
All the keys there are Pad<something>, unless numlock is on.
When numlock is on, 0-9 and . change.
-
The what-is command gives me PadStar but this code gives me * - on Windows with a Logitech K350 keyboard
_command void testkeys() name_info(',')
{
message("Press a key, ESC to exit");
while ( 1 ) {
_str key = get_event('N'); // refresh screen and get a key
_str keyt = event2name(key);
message("keyt " keyt);
if ( keyt == "ESC" ) {
return;
}
}
}
-
If I try with a new empty config, the plus, minus and enter keys also fail to show the Pad prefix with the testkeys command.
-
testkeys gives mostly the same result as key binding options dialog.
Except, it returns enter instead of pad-enter, 0, 1, 3, 9 and . instead of pad-key
Curiously, it returns ENTER, but with shift it is shift-pad-enter.
Your keyboard surely could be the problem.
Have you tried windows On-Screen Keyboard? It has an option to display a numpad as well.
For me, the keyboard and OSK seem to behave the same.
event2name() I guess isn't as good as whatever is done in key bindings.
-
Thanks, I didn't know about the on-screen keyboard. With testkeys it gives me the same results as my physical keyboard. NumPad * and / are just * and / - Ctrl-* and Ctrl-/ are C-PAD-STAR and C-PAD-SLASH. I'm using slick 23.0.0.8 on Win 10.
In keybindings, if I type numpad star in the search box it shows as PAD-STAR but when I try to bind a key to it, it shows as * and says it's bound to rexx-star. I can successfully bind a key to it by first getting PAD-STAR in the search box, then selecting the command and click the ADD button - then PAD-STAR is pre-filled. However, I wanted to use PAD-STAR in some macro code.
The what-is command shows it as PAD-STAR.
-
I'm also using Windows 10 and SlickEdit Pro 2018 (v23.0.0.6 64-bit)
FWIW, I've had pad-star and pad-slash assigned to macros for several years and I've never had a problem with them on several different computers, keyboards and versions of windows.
I do find it annoying when I'm using a laptop and I don't have a numpad though.
So I've been using an slightly unusual keyboard, so I pulled out an old Dell -- same results as I got before.
I found with what-are:
Pad9 with testkeys shows "9".
Pad9 with what-are: Shows pad9 but only when that is the first key I press after invoking what-are.
Other than the 1st keypress, what-are behaves like testkeys.
-
The "what-is" command wraps the get_event() call with this code:
int orig_auto_map_pad_keys=_default_option(VSOPTION_AUTO_MAP_PAD_KEYS);
_default_option(VSOPTION_AUTO_MAP_PAD_KEYS,0);
k=get_event();
_default_option(VSOPTION_AUTO_MAP_PAD_KEYS,orig_auto_map_pad_keys);
-
Thanks, that fixed the problem in my code.
Do you have any idea why Joe gets different results to me?
The key bindings dialog doesn't work properly for me - in the small window where it prompts for a key it says pad-star is just * and thinks it's bound to rexx-star. With the what-are command, the first time it shows me PAD-STAR and if I press the key again it now shows me * and that it's bound to c-asterisk.
-
I can't seem to reproduce that. Not sure what's going on there. I'm testing on Ubuntu 17
-
ok, I get the same behaviour in a clean config as in my normal config.
-
Just as another datapoint (Win10, UK keyboard, num-lock off) what-are reports PadStar, PadMinus, PadPlus from the number pad, all other keys lack the Pad prefix (including /).