{"id":502,"date":"2026-08-01T10:54:14","date_gmt":"2026-08-01T10:54:14","guid":{"rendered":"https:\/\/charlesandrews.us\/?p=502"},"modified":"2026-08-01T10:54:14","modified_gmt":"2026-08-01T10:54:14","slug":"jlab-keyboard-edit-swapping-page-up-end-no-software-needed","status":"publish","type":"post","link":"https:\/\/charlesandrews.us\/index.php\/2026\/08\/01\/jlab-keyboard-edit-swapping-page-up-end-no-software-needed\/","title":{"rendered":"JLAB Keyboard Edit: Swapping Page Up \/ End. No software needed."},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">This keyboard has a strange and painful mapping of the Home,End,PgUp,PgDn keys. Luckily for the keys, we can just pop those suckers off and move them to their &#8220;proper&#8221; locations. Then with a quick registry entry, set the correct key response to the new locations.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This post documents a registry-based keyboard remap that swaps the physical <strong>Page Up<\/strong> and <strong>End<\/strong> keys system-wide, using Windows&#8217; built-in <code>Scancode Map<\/code> mechanism.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Overview<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Windows reads a binary value at boot from:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Keyboard Layout<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">named <code>Scancode Map<\/code>, which lets the keyboard driver remap any physical key to send a different scan code before it ever reaches an application. A reboot is required any time this value is changed, since the driver only reads it once at startup.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The value used to swap Pageup with End[3]<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>hex:00,00,00,00,00,00,00,00,03,00,00,00,49,e0,4f,e0,4f,e0,49,e0,00,00,00,00<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Byte-by-byte breakdown<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The value is a sequence of 4-byte <strong>DWORD<\/strong> entries. Each byte pair below is written little-endian (low byte first).<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Bytes<\/th><th>Purpose<\/th><th>Value<\/th><\/tr><\/thead><tbody><tr><td><code>00,00,00,00<\/code><\/td><td>Header (version field)<\/td><td>Always 0<\/td><\/tr><tr><td><code>00,00,00,00<\/code><\/td><td>Header (flags field)<\/td><td>Always 0<\/td><\/tr><tr><td><code>03,00,00,00<\/code><\/td><td>Entry count<\/td><td>3 \u2014 the total number of 4-byte mapping entries that follow, <strong>including<\/strong> the required null terminator<\/td><\/tr><tr><td><code>49,e0, 4f,e0<\/code><\/td><td>Mapping entry 1<\/td><td>Target scan code <code>e0,49<\/code> (Page Up) \u2190 Source scan code <code>e0,4f<\/code> (End) \u2014 i.e. pressing <strong>End<\/strong> sends <strong>Page Up<\/strong><\/td><\/tr><tr><td><code>4f,e0, 49,e0<\/code><\/td><td>Mapping entry 2<\/td><td>Target scan code <code>e0,4f<\/code> (End) \u2190 Source scan code <code>e0,49<\/code> (Page Up) \u2014 i.e. pressing <strong>Page Up<\/strong> sends <strong>End<\/strong><\/td><\/tr><tr><td><code>00,00,00,00<\/code><\/td><td>Null terminator<\/td><td>Marks the end of the mapping list; always required as the final entry<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note on entry format:<\/strong> each mapping entry is two 2-byte scan codes \u2014 <strong>target first, then source<\/strong> \u2014 read low-byte\/high-byte (little-endian). The <code>e0<\/code> prefix marks an &#8220;extended&#8221; scan code, used for keys that have a duplicate elsewhere on the keyboard (e.g. Page Up\/Down, End, Home, arrow keys, right-side Ctrl\/Alt).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Setting it via Command Prompt<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Requires an <strong>elevated<\/strong> (Run as administrator) Command Prompt, since the key lives under <code>HKEY_LOCAL_MACHINE<\/code>. A <strong>reboot<\/strong> is required afterward for the change to take effect.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>reg add \"HKLM\\SYSTEM\\CurrentControlSet\\Control\\Keyboard Layout\" \/v \"Scancode Map\" \/t REG_BINARY \/d 00000000000000000300000049e04fe04fe049e000000000 \/f<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Note: <code>reg add<\/code> for a <code>REG_BINARY<\/code> value takes the hex bytes as one continuous string with no commas or spaces \u2014 different from the comma-separated <code>.reg<\/code> file syntax shown above.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Removing it<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Also requires an elevated Command Prompt, and a reboot afterward.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>reg delete \"HKLM\\SYSTEM\\CurrentControlSet\\Control\\Keyboard Layout\" \/v \"Scancode Map\" \/f<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Verifying the current value<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>reg query \"HKLM\\SYSTEM\\CurrentControlSet\\Control\\Keyboard Layout\" \/v \"Scancode Map\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This keyboard has a strange and painful mapping of the Home,End,PgUp,PgDn keys. Luckily for the keys, we can just pop those suckers off and move them to their &#8220;proper&#8221; locations. Then with a quick registry entry, set the correct key response to the new locations. This post documents a registry-based keyboard remap that swaps the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-502","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/charlesandrews.us\/index.php\/wp-json\/wp\/v2\/posts\/502","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/charlesandrews.us\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/charlesandrews.us\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/charlesandrews.us\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/charlesandrews.us\/index.php\/wp-json\/wp\/v2\/comments?post=502"}],"version-history":[{"count":1,"href":"https:\/\/charlesandrews.us\/index.php\/wp-json\/wp\/v2\/posts\/502\/revisions"}],"predecessor-version":[{"id":503,"href":"https:\/\/charlesandrews.us\/index.php\/wp-json\/wp\/v2\/posts\/502\/revisions\/503"}],"wp:attachment":[{"href":"https:\/\/charlesandrews.us\/index.php\/wp-json\/wp\/v2\/media?parent=502"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/charlesandrews.us\/index.php\/wp-json\/wp\/v2\/categories?post=502"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/charlesandrews.us\/index.php\/wp-json\/wp\/v2\/tags?post=502"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}