Num lock + pageup/pagedown does not work


#1

I am on Ubuntu Linux 13, and I work on a laptop.
The laptop has page-up, page-down, home, etc keys, but they are hardly accessible.
Luckily, it also has a full numeric pad that I can use to type in numbers or navigate by switching numlock.
With numlock on, the numeric keypad acts normally, and I can type numbers.

My issue is, with numlock off, typing on the numeric keypad yields no results.
Without using home/end/pgup/pgdown, I can’t type fast enough to use Atom efficiently.
Any way to fix this?

Note that in the settings panel, using pageup/pagedown on my numeric keypad works.


#2

I also have this problem on Ubuntu 14.04


#3

I tried using alternative key-bindings

'.editor':
   'ctrl-alt-right': 'editor:move-to-end-of-screen-line'
   'ctrl-alt-left': 'editor:move-to-first-character-of-line'
   'ctrl-alt-top': 'core:page-up'
   'ctrl-alt-down': 'core:page-down'

But I also had problems.
First, page up and page down don’t work.
Second, I tried adding a select binding:

'ctrl-shift-alt-right': 'editor:select-to-end-of-line'

But it messes all the key bindings. Apparently atom cannot have a key binding with three modifiers?

For the time being, I’ll postpone trying Atom. I don’t have time to mess up with configurations. Hope someone comes up with a solution!


#4

I just tried this in my keymap.cson:

'.editor:not(.mini)':
  'ctrl-shift-alt-right': 'editor:move-to-end-of-line'

Worked just fine for me on OS X. At least it moved the cursor to the end of the line, it didn’t select any text though. I think you would need to use editor:select-to-end-of-line to make that happen.


#5

You are right, three modifiers seems to work. I don’t know what I was doing wrong before.

But page up/page down still don’t.
Here is my current setup:

'.editor':
  'ctrl-alt-right': 'editor:move-to-end-of-screen-line'
  'ctrl-alt-left': 'editor:move-to-first-character-of-line'
  'ctrl-shift-alt-right': 'editor:select-to-end-of-line'
  'ctrl-shift-alt-left': 'editor:select-to-first-character-of-line'
  'ctrl-alt-up': 'core:page-up'
  'ctrl-alt-down': 'core:page-down'
  'ctrl-shift-alt-top': 'core:select-page-up'
  'ctrl-shift-alt-down': 'core:select-page-down'

Start of line/end of line work, but page-up/page-down, as well as select-page-up/select-page-down, don’t.
Note that if I replace “ctrl-alt-up”, with, say, “ctrl-alt-h”, it works.


#6

Have you tried using the Keybind Resolver (Cmd+. on OS X or you can find it in the Command Palette) to see what Atom is actually thinking you’re tying? It could be that some other application is capturing those keystrokes before they get to Atom.


#7

Yey! Thanks, it finally works! Here is my keymap.cson

'.editor':
  'num-end': 'editor:move-to-end-of-screen-line'
  'num-home': 'editor:move-to-first-character-of-line'
  'num-1': 'editor:select-to-end-of-line'
  'num-7': 'editor:select-to-first-character-of-line'
  'num-pageup': 'core:page-up'
  'num-pagedown': 'core:page-down'
  'num-9': 'core:select-page-up'
  'num-3': 'core:select-page-down'

#8

Great! I’m sorry it took so long … but glad we eventually got it working for you!


#9

I tried to set:

'.editor':
  'num-pagedown': 'core:page-down'
  'num-pageup': 'core:page-up'

but it works only for a few times. It stops after 2-3 keystrokes. I used the keybind resolver and it does not trigger the command.

What may be the cause?

Thanks


#10

What do you mean when you say “it does not trigger the command”? Do you mean that the Keybinding Resolver doesn’t see you pressing the button? Or it sees you pressing the button, but it doesn’t choose the command you want?

Can you include a GIF of what you’re seeing?


#11

I took a png after pressing num-pagedown, with the keybinding resolver open. The KR sees me pressing the button but does not choose the command I want. The keymap.cson is also included in the picture.

Thanks


#12

I reloaded Atom and now it is working :smile:
Thanks