Disabling Pagedown Key in Xorg: A Linux Tech Support Guide

Abstract: Disable the Pagedown key in Xorg by identifying its keycode with xev and remapping it to no action using xmodmap for a persistent fix.

Created: 2026-08-28 by
To disable the Pagedown key in an Xorg environment, you must first identify its specific keycode using the xev utility and then apply a permanent rule via xmodmap. This process involves mapping the key to no action or binding it to a harmless function, ensuring that the physical key no longer triggers page-down events in your window manager. The solution requires editing configuration files to ensure the change persists across sessions, providing a robust fix for users who find this key intrusive or accidental.

Identifying the Keycode

Before modifying any keyboard mappings, you need to know the exact numerical code Xorg assigns to your Pagedown key. This code can vary between different keyboard layouts and hardware manufacturers. The standard tool for discovering these codes is xev, which generates event windows for debugging X11 applications. First, open a terminal emulator within your active Xorg session. Type xev and press Enter. A small, blank window will appear on your screen. Click inside this window to give it focus. Now, press the Pagedown key once. Look at the terminal output where xev is logging events. You are looking for a line that resembles the following:
KeyPress event, serial 36, synthetic NO, window 0x4c00001,
    root 0x1f9, subw 0x0, time 12345678, (100,100), root:(105,105),
    state 0x0, keycode 118 (keysym 0xff54, Page_Down), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False
In this example, the keycode is 118. Note this number down, as you will need it for the next step. If you have multiple keys labeled "Page Down" or similar variations like "PgDn", check all of them to see if they share the same keycode or if they differ. Some compact keyboards may use different scancodes for modifier combinations.

Applying the Change with xmodmap

Once you have the keycode, you can use xmodmap to remap it. The command syntax is straightforward: you specify the keycode followed by an empty set of parentheses to indicate that the key should produce no output. Using the example keycode from above, the command would be:
xmodmap -e "keycode 118 ="
Execute this command in your terminal. Immediately test the Pagedown key in your browser, document viewer, or text editor. It should now do nothing when pressed. If you want to bind it to a different function instead of disabling it entirely, you can replace the empty quotes with a valid keysym, such as NoSymbol or another command like Home. However, for pure disabling, leaving the value empty is the most effective method. This change is temporary and will revert upon logout or system reboot. To make it permanent, you need to add this command to your startup configuration. Most Linux desktop environments load user-specific X modmaps from the file ~/.Xmodmap. Create or edit this file in your home directory and add the line:
keycode 118 =
If your distribution uses a display manager that does not automatically load ~/.Xmodmap, you may need to add the xmodmap command to your window manager's autostart script or your ~/.xprofile file. For systemd-based systems, creating a simple user service is also a reliable alternative.

Verifying and Troubleshooting

After applying the changes, verify that the mapping has taken effect. You can run xmodmap -pke | grep 118 to see the current mapping for that keycode. If it shows keycode 118 =, the change was successful. If it still shows Page_Down, the configuration file was not loaded correctly. Common issues arise from conflicting configurations. Some desktop environments, such as GNOME or KDE, may override xmodmap settings with their own keyboard handling daemons. In such cases, you might need to disable the default keyboard layout management in your desktop settings or use tools like setxkbmap for more persistent control. Additionally, if you are using a laptop with special function keys, ensure that the Fn lock is not interfering with the base keycode interpretation. For users experiencing broader input issues, such as keys not working in other environments, checking kernel-level drivers might be necessary. See our guide on Keyboard not working in Windows or Fedora 37 but works in Grub for deeper diagnostic steps on hardware-level failures.

Frequently Asked Questions

How do I re-enable the Pagedown key after disabling it?

To restore functionality, simply remove or comment out the line containing the empty keycode assignment in your ~/.Xmodmap file. Then, either log out and back in, or run xmodmap ~/.Xmodmap to reload the default mappings. The key will return to its standard page-down behavior.

Why does my Pagedown key still work after adding the xmodmap rule?

This usually happens because your desktop environment overrides user-level X modmaps with its own configuration system. Check your desktop settings for custom keyboard shortcuts that might be capturing the key before xmodmap processes it. Disabling the shortcut in the GUI settings often resolves the conflict.

Can I disable other keys using the same method?

Yes, the xmodmap method works for any key whose keycode you can identify with xev. You can map Caps Lock, Escape, or even unused media keys to NoSymbol to disable them. This is useful for cleaning up cluttered keyboards or preventing accidental triggers during workflows.

Is there a way to disable the key globally without editing config files?

You can apply the change temporarily by running the xmodmap -e command directly in the terminal, but it will vanish after a restart. For a global system-wide change affecting all users, you would need to modify system-level XKB rules in /usr/share/X11/xkb/, though this requires root privileges and carries higher risk than user-level edits.

What if xev doesn't show any output when I press the key?

If xev shows nothing, the key might be handled by the kernel or firmware before reaching Xorg. Try pressing it in a plain text console (Ctrl+Alt+F3) to see if it produces characters. If it works in the console but not in X, the issue might be related to X11 forwarding or display server permissions rather than the key mapping itself.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More