Tuesday, December 22, 2015

Screenshots in OSX

This is mostly for my own convenience, since I always forget the screenshot key combinations for doing the various kinds of screenshots you can do in OSX.

  • Command + Shift + 3 : Take screenshot of the whole screen
  • Command + Shift + 4 : Take screenshot of a part of the screen
  • Command + Shift + 4 : Press Space and select window to take screenshot of
The command for taking a screenshot of a window also works on open menus.

Appels official documentation: https://support.apple.com/en-us/HT201361

Make Alt + left/right work in iTerm2

I recently got a new harddrive, SSD!!!! So I made the decision to wipe the slate and did a clean install. But as always not every thing worked as before, as always. One of the most annoying things was that Alt + left arrow did not jump one word to the left and vide versa for Alt + right arrow. This is OSX default behaviour, on Linux it is Ctrl + arrow keys.

Anyway, to solve this you need to change what iTerm sends when you hit the key combination. Quickest way is to change set keys shortcuts for the default profile to "xterm Defaults"
Next you need to set the correct key bindings in your .inputrc, .bashrc etc. The file depends on how you set up your system. I cannot remember what file is standard on OSX, but i have my config stuff in a .bash_profile to avoid polluting the system more the needed. So i put the following two lines in my .bash_profile

bind '"\033[1;9D": backward-word'
bind '"\033[1;9C": forward-word'

Reload your config file or open a new terminal and I have Alt + arrow keys back working.

Have a look at http://superuser.com/questions/357355/how-can-i-get-controlleft-arrow-to-go-back-one-word-in-iterm2 also.

Wednesday, August 12, 2015

Spotify web player keyboard shortcuts

It seems that the keyboard shortcuts for the Spotify web player are different based on OS and browser!!! And it looks like they tend to change a bit over time!! Thank you Spotify.

These work on OSX with Chrome (I am on a danish keyboard, not sure if this have anything to say)

Space - Play/Pause
Shift+Right arrow - Next track
Shift+Left arrow - Previous track
Shift+Ctrl+Right arrow - Forward in track approx. 15 sec
Shift+Ctrl+Right arrow - Backwards in track approx. 15 sec
Ctrl+Alt+s - Open search
Ctrl+Alt+Up arrow - Increase volume (not above system volume)
Ctrl+Alt+Down arrow - Decrease volume

Any I missed??

UPDATE

You need to have focus i the actual player for the shortcuts to work. So you need to click in the right side player for the keyboard shortcuts to work.