Fix SSH backspace coming out as “^?”

When using SSH at FS Data, pressing backspace in Vim were coming out as ^? so editing files was a hassle. (I am on a Linux workstation btw.) mistyped

I found a solution in the Vim documentation, via a Stack Overflow post. I just opened ~/.vimrc and added the following:

:if &term == "xterm-256color"
:  set t_kb=CTRL-V<BS>

Here, xterm-256color is whatever came out when I ran :echo &term inside Vim. CTRL-V<BS> is not those literal characters, but the key combination Ctrl+V followed by Backspace. It comes out on the screen as ^?, like in the screenshot below.vimbs

Re-map obtrusive PrtSc key to take a webcam snapshot

I just switched from a MacBook Pro to a Lenovo ThinkPad, where I had Ubuntu installed. Switching OS is not too much of a problem, as I am already used to Ubuntu from before. What’s causing more irritation is the new input devices, i.e. the trackpad and the keyboard.Thinkpad Print Screen key placement

One of the more annoying features is the overly accessible Print Screen key, positioned right between AltGr and Ctrl. I have accidentally pressed it at least three times during the last few days, which on Ubuntu triggers a camera shutter noise and a dialog for the newly captured screenshot. It’s easy enough to ignore it and learn to simply press Esc and continue working, but I decided to do something more fun about it: When the key is pressed, take a photo with the webcam. Continue reading “Re-map obtrusive PrtSc key to take a webcam snapshot”