Scrolling with keys on numeric keypad with num lock off

Hi all

I have PhpStorm 6.0 running on Ubuntu 12.04 on a big HP laptop which has a full size keyboard, including a normal numeric keypad on the right. The arrow keys in the main part of the keyboard are small and inconvenient to use. I would like to use the arrows keys that are part of the numeric key pad.

The keys on the numeric keypad normally produce numbers of course but if I hit num lock so num lock is off they become arrow keys. The problem is that in PhpStorm, they scroll the whole edit window up and down rather than move the cursor.

Is there any setting that can change this? I don't know if the problem is specific to this hardware, Ubuntu or what but in other applications such as gedit, Libre Office or a textarea on a web form, the keypad arrow keys work as I want, i.e., they move just the cursor, not the whole window. I've tried the two checkboxes in PhpStorm that are related to scrolling but that doesn't help.

Thanks for a great product.

8 comments

Hi there,

Settings | Keymap

Customize keys as you want. Quite likely that numeric keypad keys are assigned to different actions as normal arrow keys.

Hint: the "search by shortcut" functionality is available (the button on the right to search field) -- use it.

0

Thanks Andriy, I'm looking at that now but something is a bit weird.

When I use the "Find Actions by shortcut" box, the dedicated arrow keys and the numeric keypad arrow keys (num lock off) produce the same code. The both say Up, Down, Left or Right so I can't distinguish between those two sets of keys. They should produce the same result but when I'm in the editor, they don't. The editor seems to intepret those keys differently to the Settings | Keymap.

I have a pretty standard installation, I don't think I have anything weird affecting key codes.

0

One more thing to note.

On the left side on the screen where I have my project open, those numeric keypad arrows do work like normal arrows keys. I can use them to navigate up and down my directories. But ... over in the edit window they work as if I was holding down the ctrl key because ctrl down is mapped to scroll down etc.

0

I do not know then.

I never had such problem .. but I'm on Windows. But I definitely remember seeing somewhere else when the person complained about similar behaviour  (also on Linux), and I he/she fixed it by altering shortcuts in keymap.

Maybe somebody else who uses Linux can give you useful advice here.

0

I had the same problem on Ubuntu 13.10 and phpStorm 7.1.3.
To make the numpad buttons behave like navigational I did the keymap reassignment.

Go to File | Settings search for Keymap. Then at the right panel in the Editor Actions reassign Up, Right, Down, Left actions. Search for Up, right click and select Add Keyboard Shortcut. Then press any button and again press numpad Up button. Do the same thing for Right, Down and Left actions.

After reassigning the numpad buttons behave like navigation buttons.

To get Shift+Numpad buttons working like Shift+Arrows for code selection, repeat the same reassigning with actions Up with Selection, Right with Selection, Down with Selection, Left with Selection.

4

Thank you Jevgenijs Saltish. I had this problem on Ubuntu with my old IBM AT keyboard (which doesn't even have dedicated arrow keys), and your detailed answer was exactly what I needed to get my numpad arrows working.

Thanks!

0

It's 2018 and this bug hasn't been fixed yet.

0

The solution here works fine for all of the numpad keys except the delete key.

On linux, the numpad delete key is interpreted as "Period" and there is no way to distinguish it from the normal "Period" button.

This issue really grinds my gears. There's nothing quite like optimizing your work environment for years and then just finding out that optimization is not possible in a new environment.

0

Please sign in to leave a comment.