Ubuntu – How to change Shift + behavior


I am used to use the numeric keypad for navigation (e.g. : [KP7] -> Start, [KP1] -> End, [KP4] -> Left, etc… ).
I am also used to use it for selection (e.g. : Shift+[KP7] -> Select from cursor position to beginning of line, Shift+[KP1] -> Select from cursor position to end of line, etc…)

With the keyboard configuration installed with Ubuntu, though, Shift+[KP7] prints the character "7", Shift+[KP1] prints "1", etc…

How can I change this so that Shift+[KP-key] is not mapped to [key], but to Shift+[KP-key] ?

Best Answer

I finally found out there was a standard ubuntu option to set this :

  • Open "keyboard preferences" ; in the "Layouts" tab, click the "Options..." buton
  • Look for the "Miscellaneous compatibility options" group
  • Select the "Shift with numeric keypad keys work as in MS Windows" checkbox.

EDIT 1: In newer versions (eg.Ubuntu 18.04) look at Tweaks> Keyboard and Mouse>Additional Layout options>Miscellaneous compatibility options>"Num Lock on: digits; Shift for arrow keys. Num Lock off: arrow keys (as in Windows)"

EDIT 2: Or, as suggested in XUbuntu: Make Shift+NumPad work like Windows

Use the following command as workaround:
setxkbmap -option 'numpad:microsoft'

In order to run the above command automatically when starting the graphical desktop environment, create an Application Startup entry:
Search for Startup Applications > Add

          Name: Make Shift+NumPad work like MS Windows
Description: whatsoever
   Command:setxkbmap -option 'numpad:microsoft'

Related Question