Updated for Mac OS X Mountain Lion 10.8.2. Visual studio 2017 community for mac.
In order to get page up and page down to work properly under Mac OSX Terminal, as well as the home and end of line (EoL), you need to go to Preferences and then Keyboard and configure the right escape key sequences.
Control End On Mac Keyboard
The information in this article applies to Excel versions 2019, 2016, 2013, 2010, Excel Online, and Excel for Mac. Use Fill Down to Duplicate the Data in a Cell The Keyboard Method. The ‘fn’ key on the Mac keyboard is the function button, hitting that with the left arrow will immediately jump to the very top of a page in the active application of Mac OS. This is the exact same function as hitting the “Home” button on a Windows PC. The “End” button on a Mac Keyboard: Fn + Right Arrow.
![Page up on keyboard Page up on keyboard](https://docs.mellanox.com/download/attachments/6884773/image2018-11-14_13-35-36.png?version=1&modificationDate=1542622567653&api=v2)
(Note for laptop users: you don't have the page up/down and home/EoL keys, but you can simulate them by holding the 'fn' key and pressing on an arrow key. So these configurations also apply to you.)
In the Terminal Preferences, go to the Keyboard pane and watch the the keys named 'page up', 'page down', 'home' and 'end'. You will see they already exist but are configured to scroll the buffer rather than sending commands to the server you're connected to.
Mac Keyboard Page End
In order to change this, double click on each of the relevant lines and select Action: 'Send string to shell:'
You then need to enter the correct string to send to the shell. This is a multiple key sequence starting with the escape character (which is represented with it's octal code 033). Here are strings you can use for each key:
As of OSX 10.6.8, the correct fix is:
Key | Recommended Escape Sequence | Other possible sequences you can try if the recommended doesn't work for you | ||
---|---|---|---|---|
Home | 033OH | 033[1~ | 033[H | 001 |
End | 033OF | 033[4~ | 033[F | 005 |
Page Up | 033[5~ | |||
Page Down | 033[6~ |
You can either type these strings on your keyboard (start by presseing Esc) or you can just copy paste the strings from above. Vlc not working on mac.
Keyboard On Mac Not Working
It is worth noting that some of these are already bound to Shift-Page Up, Shift-Page Down, Shift-Home and Shift-End (which are obtained with Shift-Fn-Up/Down/Left/Right on a laptop keyboard). So if you can change your habits slightly you don't actually need to reconfigure anything.
Apple Keyboard End Key
Also note that some people (including Apple) recommend to use 033[H for Home but this doesn't actually work in vi or vim. This is why I recommend using 033OH which has worked in any shell or editor for me so far (Mac terminal, Debian terminal, vim, etc.)
If the recommended sequences don't work for you: please try the alternative suggested here. Mac studio fix foundation nc30. Also please let us know with which shell or editor you are trying to make them work and which escape sequences work best for you. This way we can order them in order of popularity and possibly give specific advice for specific environments to future visitors of this page. Thank you for your feedback.
This entry was posted on Dec 21 2008 at 04:04 by admin and is filed under Mac stuff. Tags: howto, mac os x, terminal