How to disable the PageUp / PageDown keys?

They're way too close to the arrow keys

Typed in xmodmap -e "keycode 112 = " and
xmodmap -e "keycode 117 = "
but it didn't work

It will work* if you omit the spaces around the '=' sign

*(I just tested it and can confirm that it works)


It didn't work for me. I typed both in and nothing happened. can i see your terminal?

thom@monolith:~$ xmodmap -e "keycode 112="
thom@monolith:~$ xmodmap -e "keycode 117="

Every app started after the invocation of these commands will no longer respond to PgUp or PgDn


Hey thanks, it worked :slight_smile:

Hi, so every time I turn the computer off, it resets. Is there any way to make this change permanent?

Ofcourse there is :slight_smile:
(several ways actually)

Why don't you add it to control center -> startup applications ?
That is probably the easiest way for you to accomplish that.

how do i do that exactly?

Creating startup entries (see also illustration below):

Open Control Center and:

  1. click "startup applications"
  2. click "add"
  3. fill the fields, put xmodmap -e "keycode 112=" in the commandfield
  4. click "add"
  5. Repeat step 2 to 4 for xmodmap -e "keycode 117="
  6. Close everything.


Screenshot at 2023-02-23 18-19-04

Thank you. I also want to disable to PrtSc button, which of these values is the correct keycode?

Printscreen key is 99 :slight_smile:

1 Like

Hi, so it didn't actually work for some reason. PgUp / PgDn and PrtScr still work on startup

Did you put xmodmap -e "keycode 112=" in the command field ?
(in the picture it says, wrongly, map -e "keycode 112=" because the visible part of the inputfield is too small to display the full command)

It works here. If it doesn' work for you I'll try something else.

It didn't work, sorry for getting back so late