How to disable numpad digits in Ubuntu 18?

Marry

I have a work laptop with numpad keys, and the navigation keys (home/end, page up/down, insert, delete) are also there. And their behavior depends on Numlock key state.

I don't have a habit of using numpad digits - in fact, I don't need them at all. But I need home, end, insert, delete and combinations with them. And now I accidentally press that Numlock 100 times per day (it's too close to Return) and getting 7, when I need to select text, 0 when need insert text, and so on.

I am starting to hate this key.

I tried to use Tweaks, but "as in Windows" is not what I need, and "as in MacOps" produce only digits.

I need visa-versa: completely get rid of digits from numpad and disable numlock. End should set cursor to the line end, and shift+end should select text from cursor position to the line end - no matter what.

Is that possible?

UnKNOWn

The links provided by @Rinzwind are very useful and I upvote his comment, I thought to write below steps just to let you get quick output/ result what you are looking for, I recommend you to follow those links to understand the concept and become master in mappings..

  1. Turn off the Num_Lock key.

  2. run xmodmap command in terminal..

you will get the result similar to below..

pratap@i7-6550U:~$ xmodmap
xmodmap:  up to 4 keys per modifier, (keycodes in parentheses):

    shift       Shift_L (0x32),  Shift_R (0x3e)
    lock      
    control     Control_L (0x25),  Control_R (0x69)
    mod1        Alt_L (0x40),  Alt_R (0x6c),  Meta_L (0xcd)
    mod2        Num_Lock (0x4d)
    mod3      
    mod4        Super_L (0x85),  Super_R (0x86),  Super_L (0xce),  Hyper_L (0xcf)
    mod5        ISO_Level3_Shift (0x5c),  Mode_switch (0xcb)

pratap@i7-6550U:~$ 

note that Num_Lock is for mod2

  1. we need to Remove Num_Lock from mod2 with below command in terminal

xmodmap -e "remove mod2 = Num_Lock"

Example:

pratap@i7-6550U:~$ xmodmap -e "remove Mod2 = Num_Lock"
pratap@i7-6550U:~$

since we removed Num_Lock from mod2 when the Num_Lock state is off, there will be no effect even we press Num_Lock here onwards.. hence its state is always off.

this command in terminal will not persist after a logout or reboot.. so add this command to startup applications like below..

enter image description here

When ever you want to operate Num_Lock key in a running session, you can run below command xmodmap -e "add mod2 = Num_Lock"

when you want to get rid of all these changes and want the default behaviour.. remove the startup command we added.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Ubuntu numpad shortcuts

From Java

Play digits pressed in numpad using autohotkey

From Dev

How to emulate numpad on a PC laptop?

From Dev

How to access numpad keys in XMonad?

From Dev

Problem with Ubuntu password setting with numpad off

From Dev

How to disable and enable keyboard in ubuntu?

From Dev

How to disable and enable keyboard in ubuntu?

From Dev

How to disable TRIM on SSDs in Ubuntu

From Dev

How to disable animations in Ubuntu 16.04

From Dev

How to disable integrated webcam on ubuntu?

From Dev

How to disable sudo and su on Ubuntu?

From Dev

How to disable AnyDesk autostart in Ubuntu?

From Java

How to Install pip for python 3.7 on Ubuntu 18?

From Dev

How to Install pip for python 3.7 on Ubuntu 18?

From Dev

How to prevent Apache directory listings in Ubuntu 18?

From Dev

Ubuntu 18 - how to ungroup apps in dock?

From Dev

How to switch to a signed kernel in Ubuntu 18

From Dev

How To Restart Sudo Service in Ubuntu 18+

From Dev

how to permanently disable wifi power management for linux mint 18?

From Java

How to add a 'Done' button to numpad keyboard in iOS

From Dev

How to show the numpad automatically when the textfield is loaded?

From Dev

How to get numpad out of "mouse emulation" mode?

From Dev

How Can I Do Android Numpad Programmatically

From Dev

How to use numpad as mouse pointer (moving and clicks)?

From Dev

How to change decimal comma to decimal period in numpad?

From Dev

Disable automatic execution of apt update after running add-apt-repository on Ubuntu 18.X

From Dev

Disable automatic execution of apt update after running add-apt-repository on Ubuntu 18.X

From Dev

Ubuntu 13.10: How to disable Nvidia graphics (nouveau)?

From Dev

How do I disable telnet on Ubuntu Server?

Related Related

  1. 1

    Ubuntu numpad shortcuts

  2. 2

    Play digits pressed in numpad using autohotkey

  3. 3

    How to emulate numpad on a PC laptop?

  4. 4

    How to access numpad keys in XMonad?

  5. 5

    Problem with Ubuntu password setting with numpad off

  6. 6

    How to disable and enable keyboard in ubuntu?

  7. 7

    How to disable and enable keyboard in ubuntu?

  8. 8

    How to disable TRIM on SSDs in Ubuntu

  9. 9

    How to disable animations in Ubuntu 16.04

  10. 10

    How to disable integrated webcam on ubuntu?

  11. 11

    How to disable sudo and su on Ubuntu?

  12. 12

    How to disable AnyDesk autostart in Ubuntu?

  13. 13

    How to Install pip for python 3.7 on Ubuntu 18?

  14. 14

    How to Install pip for python 3.7 on Ubuntu 18?

  15. 15

    How to prevent Apache directory listings in Ubuntu 18?

  16. 16

    Ubuntu 18 - how to ungroup apps in dock?

  17. 17

    How to switch to a signed kernel in Ubuntu 18

  18. 18

    How To Restart Sudo Service in Ubuntu 18+

  19. 19

    how to permanently disable wifi power management for linux mint 18?

  20. 20

    How to add a 'Done' button to numpad keyboard in iOS

  21. 21

    How to show the numpad automatically when the textfield is loaded?

  22. 22

    How to get numpad out of "mouse emulation" mode?

  23. 23

    How Can I Do Android Numpad Programmatically

  24. 24

    How to use numpad as mouse pointer (moving and clicks)?

  25. 25

    How to change decimal comma to decimal period in numpad?

  26. 26

    Disable automatic execution of apt update after running add-apt-repository on Ubuntu 18.X

  27. 27

    Disable automatic execution of apt update after running add-apt-repository on Ubuntu 18.X

  28. 28

    Ubuntu 13.10: How to disable Nvidia graphics (nouveau)?

  29. 29

    How do I disable telnet on Ubuntu Server?

HotTag

Archive