Author Topic: Numeric keypad enter key randomly unbinds  (Read 3931 times)

Peter Steinberg

  • Community Member
  • Posts: 14
  • Hero Points: 2
Numeric keypad enter key randomly unbinds
« on: April 10, 2020, 06:47:36 PM »
SlickEdit Pro 2019 (v24.0.2.0 64-bit), 64-bit Windows 10.

The enter key on the numeric keypad normally works like the regular enter key.

After editing for a while suddenly I start getting the "Key not defined" message when I press the numeric keypad enter key.

The numeric keypad enter key also stops working in dialogs (find, etc.), the command line, etc.

This started happening when (or shortly after) I upgraded from 24.0.1 to 24.0.2

Any idea on how to fix this?

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6875
  • Hero Points: 530
Re: Numeric keypad enter key randomly unbinds
« Reply #1 on: April 11, 2020, 11:21:52 PM »
Hot fix checked in for this. I found two mistakes which would cause this (dynamic surround and the block_insert_mode command). You're probably hitting the dynamic surround case a lot.

Simple explanation.  For convenience and backward compatibility, SlickEdit (by default) automatically converts KeyPad keys like Enter to their equivalent non KeyPad key variant if there is no binding for the keypad variant. This allows SlickEdit not to have specific bindings for  KeyPad specific keys yet they still work. Also, users can can make a keypad key binding if they want the keypad key to do something different (some users really want this capability).  However, there are cases where this auto keypad mapping feature has to be temporarily turned off. This is where some mistakes were made.

Thanks for posting about this.

Peter Steinberg

  • Community Member
  • Posts: 14
  • Hero Points: 2
Re: Numeric keypad enter key randomly unbinds
« Reply #2 on: April 13, 2020, 01:23:20 PM »
Thanks for the quick reply; any idea on when the hotfix will be available?

SlickEdit Support

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 384
  • Hero Points: 29
Re: Numeric keypad enter key randomly unbinds
« Reply #3 on: April 13, 2020, 04:56:04 PM »
PM sent!

Peter Steinberg

  • Community Member
  • Posts: 14
  • Hero Points: 2
Re: Numeric keypad enter key randomly unbinds
« Reply #4 on: April 14, 2020, 01:16:18 PM »
Thanks, that looks like it has fixed the issue.

bengle

  • Senior Community Member
  • Posts: 168
  • Hero Points: 4
Re: Numeric keypad enter key randomly unbinds
« Reply #5 on: May 07, 2020, 02:34:41 PM »
Any idea when this fix might be available?  Since this is the Enter key that I always use, it is very annoying.

SlickEdit Support

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 384
  • Hero Points: 29
Re: Numeric keypad enter key randomly unbinds
« Reply #6 on: May 07, 2020, 03:24:57 PM »
PM sent.

The hotfix will be published shortly at www.slickedit.com/hotfix

Regards,
SlickEdit Support

dunkers

  • Senior Community Member
  • Posts: 774
  • Hero Points: 36
Re: Numeric keypad enter key randomly unbinds
« Reply #7 on: May 08, 2020, 02:09:45 AM »
Was this in hotfix 5? Prior to applying that I had this issue and it's a right pain. I applied hotfix 5 and the pad enter splits the line (although maybe it won't soon!) but it doesn't auto-indent like the real enter key does.

If the hotfix didn't have this fix in it, could I have a PM too, please? I seem to use the pad enter more than the proper one.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6875
  • Hero Points: 530
Re: Numeric keypad enter key randomly unbinds
« Reply #8 on: May 08, 2020, 02:00:26 PM »
I'm not able to reproduce this difference where one Enter key indents and the other doesn't. What is the language type of the file you are editing. I only tested C++ so far.

dunkers

  • Senior Community Member
  • Posts: 774
  • Hero Points: 36
Re: Numeric keypad enter key randomly unbinds
« Reply #9 on: May 08, 2020, 03:03:33 PM »
It is C/C++. Checking keybinding, pad enter is bound to split_insert_line(), just like enter.

Perhaps I need to be more specific. Given this code:

Code: [Select]
    if (something) {
    }

with the cursor at the end of the first line, pad enter inserts a blank link and puts the cursor under the if:

Code: [Select]
    if (something) {
    |
    }
So that's indenting to the start of the if statement. But enter indents to the beautifier depth, which in this case in a further indent:

Code: [Select]
    if (something) {
        |
    }

I and use both keys in that if() and the indents are consistent and 100% reproducible.

Edit: 24.1 is fine.

dunkers

  • Senior Community Member
  • Posts: 774
  • Hero Points: 36
Re: Numeric keypad enter key randomly unbinds
« Reply #10 on: May 08, 2020, 10:10:31 PM »
Dunno why I didn't spot this before: the main enter key is bound to TONS of stuff, just one of which is split_insert_line(). Taking a punt I bound pad enter to c-enter and now it works as it should (in C files).

But shouldn't it be bound to all the functions that the big enter is bound to? If so, how come it isn't, and is there a quick (and simple) way to make it so?

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6875
  • Hero Points: 530
Re: Numeric keypad enter key randomly unbinds
« Reply #11 on: May 08, 2020, 10:15:34 PM »
If you bind your Pad Enter key, then it can function differently. Otherwise, SlickEdit is supposed to automatically map it onto your regular Enter key binding.

You might want to try a default config. Maybe you bound the Pad Enter key accidentally.

dunkers

  • Senior Community Member
  • Posts: 774
  • Hero Points: 36
Re: Numeric keypad enter key randomly unbinds
« Reply #12 on: May 08, 2020, 10:28:37 PM »
I don't bind keys, so no chance of that. I just installed 24.2 and let it copy my config from 24.1, which still works as it should. Definitely a 24.2 problems, whether it lost something or didn't copy something.

OK, I just unbound pad enter from everything and now it's back to the original issue: inserts a line and only indents as far as the 'if' in my example above. Or the start column of the previous line. That is, it's ignoring the beautifier settings. Enter works as expected.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6875
  • Hero Points: 530
Re: Numeric keypad enter key randomly unbinds
« Reply #13 on: May 08, 2020, 10:39:20 PM »
Please post your user.cfg.xml. I'll remove any bindings you have for Pad Enter and see if I can reproduce this problem.

dunkers

  • Senior Community Member
  • Posts: 774
  • Hero Points: 36
Re: Numeric keypad enter key randomly unbinds
« Reply #14 on: May 08, 2020, 11:59:08 PM »
I'd prefer not to post that here since it has client identifiers in it. I tried to send a URL to you where you can download it, but apparently you don't accept PMs (or, at least, not from me). Any other way I can get this to you?