Posts Tagged ‘autohotkey’

Overload capslock keyboard key in windows

January 24th, 2017

We all have this centrally keyboard key that is seldom used. I am thinking of caps lock.

I wanted to use it as an alternative key, not as ctrl or anything; but as something totally different that does not invade existing short cuts.

Rewiring the capslock is harder than it looks at first glance.
I didn’t find a Good solution but at least one that works; for now.

Autohotkey

Autohotkey aka AHK is for writing macros for keyboard, mouse(?) and joystick. The language is awful but don’t let that scare you away.

I have mapped CapsLock to be used with j, k, l and ; to navigate.
Capslock by itself is Esc.

Source code

Regular header stuff in the file:

1
2
3
4
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.

Make Capslock not work as capslock but also make it work as Esc:
(I believe some magic is involved.)

1
2
3
SetCapsLockState AlwaysOff
!CapsLock::CapsLock
CapsLock::Send {Esc}

Map the personal stuff. In my case navigation:

1
2
3
4
CapsLock & j::Send {Left}
CapsLock & k::Send {Right}
CapsLock & `;::Send {Down}
CapsLock & l::Send {Up}

Unfortunately I don’t remember the sources I puzzled together my solution form.

Tools I use

July 28th, 2009

Below are the tools, sites and stuff I use.  I plan to update it as it goes.

Correction: I planned but haven’t.

Also: I have a shorter and similarly not-propertly-updated list as a article here.

7-zip
http://www.7-zip.org/
Even though I have a Winzip license I haven’t bothered installing it for several years.  I guess Microsoft killed Winzip through having simple zip support out of the box and for all other needs there are 7-zip.
Open source.
Winzip deserves an extra mentioning though due to their license: your payment is also valid for all updates.  Many many other software companies have something to learn there.

Agent ransack
http://www.mythicsoft.com/agentransack/
The built in searching software in Windows XP and forward sucks big time.  To its defense I must say that it searches Microsoft office documents.  But since it doesn’t search all folders it is rendered useless for a developer like me.  Agent ransack searches fast, very fast, and has a simple regex tool to refine searches. One can limit files and folders searched in and search in system files too.

Update:
The built in search in Vista is weird. It might work for office people, you know the kind that really can’t tell the difference between windows, word, internet explorer and internet. This search was probably updated for Win7 and very much so for Win8. But Agent ransack still has its use for really doing searches in files with regex and stuff.

Autohotkey
http://www.autohotkey.com/
This open source solution is handy for global shortcuts.  I use it to set the size of windows to cover half the left, right, top or bottom.  I also send my windows between my monitors with a similar keystroke.  It has a wierd scripting language and some bugs regarding how big monitors and windows are.

Update:
Sending the windows around between two or more monitors is done win Vista and later with window-arrow keys.

Connectionstrings.com
http://connectionstrings.com/

In Windows one have to have a connection string to connect to a database.  These come in all colours and tastes.  This site has a comprehensive list.  Gratis.

Dpack
http://www.usysware.com/dpack/
It is an addin to Visual Studio.  Gratis.  A must-have if you develop in Visual studio.
The most used shortcuts, for me, are alt-u to open files and alt-m to go to a method.  With this there is no more searching for files in the solution explorer or scrolling up and down looking for the right method.

Update:
Open source.
I still use it since Visual studio 2013 still hasn’t caught up. Not even with Resharper.

Filezilla
http://filezilla-project.org/
Filezilla is a free FTP server and client.  I only use the client.  I cannot say if it is the best of its crop or has some whiz-bang stuff that oushines the competition but it is free and fairly simple to use.

Keepass
http://keepass.info/
I have lots of passwords and so do most of us.  Instead of having the same password for most places or a system of passwords, use unique ones; then you don’t have to worry about people getting your hotmail because they got hold of the passwords for a small site somewhere and successfullly try it on hotmail too.
I have the same database synchronized with my Windows mobile phone; this requires an older version of the software unfortunately, but I keep the passwords with me without the need of a computer.
It is open source so you can inspect the source code at will.

Media-convert.com
http://media-convert.com/
A gratis site for converting all sorts of formats, not only video and sound.

MyGeneration
http://www.mygenerationsoftware.com/
I am a sucker for not writing code I don’t have to.  Automatic code generation is the way to go.
Open source.

Update:
T4 is a tough competitor.

Notepad2
http://www.flos-freeware.ch/notepad2.html
http://code.kliu.org/misc/notepad2/
I don’t think Notepad2 is the best editor out there.  Not even close really.  But it makes it easy to exchange your Notepad.exe with the vastly superior and open source Notepad2.  Notetab does the same pre WinXP and possibly many other editors too but this is the only I have tried (post win2k) and I use it.

Update:
I have since switched to Notepad++. Before that I used Notetab.

NUnit
http://nunit.org/index.php
Automatic testing is considered good.  I might be too much to test everything but the important things and the difficult things are worth while to test automatically.
Open source.

NUnitEx
http://code.google.com/p/nunitex/
This open source extension lib to NUnit makes it more fluent to write assertions.  The best return of investment is when writing tests for exception throwing.

Opera
http://www.opera.com/
This is my primary web browser and has been since before 2000.  For certain development things Firefox is better and one must have Internet explorer around for about one site a year but for the other 8759 hours Opera is to prefer.Web browsers are a pain to user with the keyboard.  Opera lets you navigate between the controls with shift-arrows; so much easier debugging when one doesn’t have to grab for the mouse all the time.
Gratis.

Opera mobile
http://www.opera.com/mobile/
Arguably the best mobile browser for fat mobile phones.  It is gratis.
For smaller phones I would use Opera mini that renders the web page in a farm and then sends just the result.  It doesn’t work with javascript heavy sites though.
There is an application, Skyfire, that I believe works like Opera mini. Don’t mix up Opera mobile and Opera mini.

Update:
Other mobile browsers has caught up.
A couple of years ago I did a comparison and couldn’t spot a winner.
As of today I believe Firefox mobile is the only one that supports Ghostery so right now it is used as much as Opera.

Pastebin.com
http://pastebin.com/
If you ever have tried sending a snippet over email or especially chat you know bad how the layout gets scrambled.  Enter Pastebin.
Paste the code into Pastebin and send the unique URL.  It even has history so when chatting you can update the code and resend.
Gratis.
There are competitors but I havn’t found any as good.

PDFCreator
http://sourceforge.net/projects/pdfcreator/
To create PDF documents I use an open source solution.  It installs itself as a printer so it is usable for everything from everywhere.  For reading I use OpenOffice instead of the competitor-for-the-worst-software-written-ever program from Adobe themselves.

PowerCommand for Visual Studio 2008
http://code.msdn.microsoft.com/PowerCommands
Gratis.  Source code available but I don’t know if there are any strings attached.
It has Copy reference and Open folder and Open command prompt.  No more tedious searching for references or walking all over the hard drive to find the correct folder.

Spam gourmet
http://www.spamgourmet.com/
An online solution for one time email addresses.  Good for avoiding spam.  It is gratis but it sometimes takes a while for the emails to pass through.Approximately the same result can be gained by having a spare email account for this but Spam gourmet comes with a number-of-possible-sendings solution that might be handy.

VLC
http://www.videolan.org/vlc/
There are many media players.  VLC is one of them.  I use it since it takes most formats.
It went version 1 in 2009.
Open source.There is another well known application, Media player classic, that does approximately the same.  To be honest, I use both.

Winmerge
http://winmerge.org/
This is an open source diff tool.  It has a nice keyboard navigation, something that the diff program that comes with Visual studio has totally messed up.  None of these two have any knowledge about classes and methods so if you swap two methods it is recognized as add and delete instead of the move it really is.
Somewhere I found a program that can diff 3 files at once but the URL is since long forgotten.