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?
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..
Turn off the Num_Lock key.
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
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..
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.
Comments