Archive for the ‘computers’ Category

My Escape key stopped working today. After freaking out for a few minutes about where I’m going to get the money to buy a new keyboard, I made a quick AHK script that remaps the Caps Lock key to Escape. Then I realised that I would probably tap it by accident doing some irreversible damage while typing, so I thought I’d remap Scroll Lock to Escape (Who uses scroll lock, anyway?):

Send {Esc}

On the topic of Caps Lock, everyone know how annoying it is when you accidentally press it and your wall post’s mood changes significantly. SERIOUSLY ANNOYING. So here is how to remap the Caps Lock key to something else. In this case, it acts as a third Control key:


If you sometimes do need to use the Caps Lock, like when you’re flaming a forum, or coding a serious error message, you can map Shift+Caps Lock to toggle Caps Lock. I tried doing it like this, which is the way most people did it in the foums:


But unfortunately that only turned Caps Lock on and not off. And since my Caps Lock key is remapped to Control, I couldn’t turn it off without killing the AHK script.

The following script does work, as it checks the state of Caps Lock and then acts accordingly:

if GetKeyState("Capslock", "T")
SetCapsLockState, Off
SetCapsLockState, On

I’ve always wanted my scroll wheel to be an easy volume-control, as my keyboard does not have media keys. I Googled and went through forum after forum to find out what AHK commands control volume, but none of them worked right. Then today I stumbled across something. The media keys are keyboard keys after all, and can be mapped and remapped in AHK just like any other, even if your keyboard doesn’t have them. Here is a simple script that uses the scroll wheel and middle mouse button to change and mute the volume:


When in doubt, consult the AutoHotkey Key List.
I also recommend you also take a look at my other post on AutoHotkey.


Retrostyle Arcade Tech Demo #1

Posted: January 24, 2011 by jellymann in computers, gaming, java, programming

So sorry I never got you screenshots of the game earlier, so I’ve decided to make up for it by giving you guys a video!

Enjoy 🙂

Inception, Part 3…

Posted: January 23, 2011 by jellymann in computers, CPU, inception, linux, ubuntu, virtualisation

… and probably the last one. I tried again this week with Virtual PC and I ran into similar problems.

the reason, I think, is because my fail processor doesn’t support this kind of hard-core virtualisation, so I might have to wait until I get a Core i# with Hardware Virtualisation before I consider part 4 at all.

Anyway, thanks for the interest 🙂 All I got accomplished so far was install five different operating systems inside one: Ubuntu, OpenSUSE, Fedora, Windows XP and Windows 7. My computer is going to die soon, I guess…

Looks it, too

Perfection is Unknowable

Posted: January 21, 2011 by jellymann in computers, customization, linux, ubuntu

I am a fan of minimalistic user interfaces. I have always been searching for the “perfect” desktop. Well, I discovered that there isn’t really one.

The thing about perfection is that it’s unknowable. It’s impossible, but it’s also right in front of us all the time.” – Kevin Flynn

Apple have done a fantastic job making the “perfect” desktop with Mac OS X. That is why a lot of people who don’t have a Mac will try and make their OS look like Mac OS X. I used to be one of those people. Since then I have realised it isn’t the best way to a perfect desktop.

Let me start with my Windows 7 desktop. After years of customisation and re-customisation to make Windows look like a Mac, I came sudden realisation: Why not keep Windows the way it is? Well I reverted everything back to the way it was and started from scratch. It’s surprising how well Windows works being Windows. I did, however, make one visual modification. I did install a new visual style, but this one stays true to Windows 7’s Aero, but moves one tiny step towards Apple, by replacing the reflective glass look with a soft gradient, and making the shadows bigger and softer. If you want to check it out’s called Soft7.

Now let me talk about my Ubuntu desktop. This one’s going to be a lot more than one paragraph because Linux is extremely customisable, way more so than Windows.

I did not attempt to make Ubuntu look like Mac OS X, but I did create look inspired by it. The few things I “borrowed” from Apple include borderless windows which create a much crisper look, the dock (in fact, two of them), and the global menu bar. The rest of the look is very loosely based on Mac OS X and is in fact a GTK Theme I borrowed from another OS based on Linux. I got the icons from it as well. Many thanks to DanRabbit, who in my opinion is a genius. I did, however, change a few things, like make the menus borderless to match the windows. Elementary also has a modification to Nautilus which cleans up its interface quite a lot.

Instead of the Gnome Main Menu, I opted for a more “invisible” approach to running apps not present in my dock. Lifehacker pointed me to a fantastic utility called Synapse that is similar in function to Gnome-do but with much more capability. I can easily launch any installed app without browsing for it with my mouse. The only drawback to this is that I need to memorize all the apps I use and have installed, and so far I have had to refresh my memory a couple of times.

The idea behind a global menu bar is that only one application’s menu bar is visible at a time, thus preventing the user from accidentally using the wrong window’s menu bar. It also helps with small windows having long menu bars, such as GIMP. The Gnome-globalmenu is available for Linux and works for most GTK apps. The only app I use that does not benefit from it is OpenOffice. Firefox also doesn’t benefit from globalmenu.

I also all reduced the titlebar to a five-pixel high strip with my own Metacity theme that is blue when active and grey when inactive. This saves a bit of screen real-estate which I can use for other things, like viewing more of this document. The only downside is that I have to find other ways of know what document or image I’m actually working on! Thankfully most programs have ways of doing so.

I’m using a fantastic dock called Docky. It might be a little buggy now and again but it more than makes up for it in all it’s awesomeness. It is simple to use, easy to set up, and look great. It has the 3D reflective table thing going on right out of the box.

And last but definitely not least is Compiz, Linux’s major composite window manager. I have made my own modifications to the configuration, mainly just animations, but also stuff like the desktop wall and th expose feature. All in all this makes for a very unique feel.

Clean Stuff

Oh and one more thing, though. To match my awesomely minimalistic desktop, I chose some wallpapers from the fabulous selection over at Simple Desktops.

Retrostyle Arcade

Posted: January 18, 2011 by jellymann in computers, gaming, java, programming

Ok so I promised you I would post about the game I’ve been developing over the last I don’t know how long. I started a long time ago, maybe a year or two, and it was a bit of an on-off. It hadn’t seen the light of day for about a year but recently I’ve picked it up again and have done some major improvements.

The game, originally called Arcade, but renamed to Retrostyle Arcade, is very simple. You play as an orange arrow (), and you shoot at green triangles (). You are equipped with a gun and shields (), which can be upgraded. You can even pick up rockets () later on.

It’s not all that great, really, but it’s been a learning experience and I think with a few small changes to the gameplay and graphics it might become commercially viable.

Let me give you some details:

1. It’s written in Java, so that I can develop it in and for Windows and Ubuntu, but it will be able to run on anything (Mac, BSD, Solaris, etc).
2. It uses OpenGL, so you will need hardware acceleration.
3. I use a graphics engine called Slick, which makes writing 2D games a lot easier. It uses lwjgl but is structured a little like Java2D, so that newcomers aren’t faced with insane OpenGL calls.
3. I recently added some 8-bit sounds I made using a neat program called sfxr , which is also cross-platform.
4. The game used to have a 2-player mode, but was removed because of numerous bugs, and I didn’t think it was any fun anyways.
5. I made my own particle engine because the one supplied in Slick had problems.

No screenshots right now, I’m having technical difficulties 😦

The game is far from finished, and there is no release date.

AutoHotkey puts the HOT in Hotkey

Posted: November 25, 2010 by jellymann in computers, hotkeys, keyboard, mouse, tech, windows

If you’re a Windows user and you don’t know about AutoHotkey, you’re living a sad, sad life.

AutoHotkey unleashes the full potential of your keyboard, joystick, and mouse. For example, in addition to the typical Control, Alt, and Shift modifiers, you can use the Windows key and the Capslock key as modifiers. In fact, you can make any key or mouse button act as a modifier.”

AutoHotkey (AHK) works with scripts. The basic syntax is fairly easy to understand, however some of the more complicated stuff is, well, more complicated.

Lets look at an example of a simple but very useful AHK script; a hotkey that runs a program, eg. Calculator, when WindowsKey and C is pressed:

#c:: Run, calc

The hash (#) represents the Windows Key. The letter after that is the key to be pressed with the Windows Key. Thus ‘#c‘ means the hotkey is activated when the WindowsKey and C is pressed. Other modifiers include Shift, represented by a plus sign (+), Control by a caret (^) and Alt by an exclamation mark (!).

Then there’s two colons (::) directly after defining the keys. Whatever is on the right of the colons is what is executed when the keys are pressed.

Run‘ quite simply runs the command after the comma, and ‘calc‘ is the command in Windows for opening the Calculator. You can do the same thing with ‘notepad‘, ‘cmd‘, ‘iexplore‘, and loads more.

Scripts can obviously be more than one line long, for example:

Sleep 10
Run, calc

Does basically the same thing, except for the ‘Sleep‘ command, which, in this case, waits ten milliseconds before running ‘calc‘.

The ‘return‘ function ends the multi-line hotkey. If you didn’t have this here and you define another hotkey after that one, it might think that hotkey is part of the previous one.

Besides built-in Windows programs like ‘calc‘ and ‘notepad‘, other programs can be ‘Run’. For example, I use Notepad++ and use Windows Key and N to launch it using the following script:

Sleep 10
Run, E:\programs\npp\notepad++.exe

You can even ‘Run‘ websites. For example, you could make Windows Key and F open Facebook in your default browser:

Sleep 10

I have a very useful hotkey that Googles whatever I select by pressing Windows Key and G:

Send, ^c
Sleep 50

The ‘Send‘ command here “sends” Control+C to the computer as though you pressed it on the keyboard. This copies whatever text you might have selected into the clipboard.

After sleeping for fifty milliseconds (to make sure the computer is finished copying your selection) it runs Google with the copied text as the search criteria.

%clipboard%’ puts whatever is copied into the clipboard wherever you want. You can even put it in a ‘Send’ command (i.e. Send, %clipboard%)

Scripts can get very complicated, for instance, this script I have which allows me to move my Windows around without dragging from the titlebar by holding down the Windows Key (like Gnome/Ubuntu):

CoordMode, Mouse ; Switch to screen/absolute coordinates.
MouseGetPos, EWD_MouseStartX, EWD_MouseStartY, EWD_MouseWin
WinGetPos, EWD_OriginalPosX, EWD_OriginalPosY,,, ahk_id %EWD_MouseWin%
WinGet, EWD_WinState, MinMax, ahk_id %EWD_MouseWin%
if EWD_WinState = 0 ; Only if the window isn’t maximized
SetTimer, EWD_WatchMouse, 10 ; Track the mouse as the user drags it.

GetKeyState, EWD_LButtonState, LButton, P
if EWD_LButtonState = U ; Button has been released, so drag is complete.
SetTimer, EWD_WatchMouse, off
GetKeyState, EWD_EscapeState, Escape, P
if EWD_EscapeState = D ; Escape has been pressed, so drag is cancelled.
SetTimer, EWD_WatchMouse, off
WinMove, ahk_id %EWD_MouseWin%,, %EWD_OriginalPosX%, %EWD_OriginalPosY%
; Otherwise, reposition the window to match the change in mouse coordinates
; caused by the user having dragged the mouse:
CoordMode, Mouse
MouseGetPos, EWD_MouseX, EWD_MouseY
WinGetPos, EWD_WinX, EWD_WinY,,, ahk_id %EWD_MouseWin%
SetWinDelay, -1 ; Makes the below move faster/smoother.
WinMove, ahk_id %EWD_MouseWin%,, EWD_WinX + EWD_MouseX – EWD_MouseStartX, EWD_WinY + EWD_MouseY – EWD_MouseStartY
EWD_MouseStartX := EWD_MouseX ; Update for the next timer-call to this subroutine.
EWD_MouseStartY := EWD_MouseY

Don’t ask me to explain this, I got it from somewhere else. By the way, anything after a semi-colon (;) is a comment and is ignored by AHK.

Here are a few more that I use:

Windows Key and H toggles Show/Hide Hidden Files in Explorer:

RegRead, HiddenFiles_Status, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, Hidden
If HiddenFiles_Status = 2
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, Hidden, 1
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, Hidden, 2
WinGetClass, eh_Class,A
If (eh_Class = “#32770” OR A_OSVersion = “WIN_VISTA”)
send, {F5}
Else PostMessage, 0x111, 28931,,, A

Windows Key and Right Mouse Button (Yes you can combine with mouse events!) minimizes the Window under the mouse cursor:

MouseGetPos, , , WinID, control
WinGetPos, WinX, WinY, WinWidth, , ahk_id %WinID%
WinMinimize, ahk_id %WinID%

Windows Key and Q is a lot more comfortable than Alt F4, which is a commonly used hotkey for me. This simple one-liner saves me some wrist aerobics:


Check out the Tutorial on AHK scripting, the list of keys, or the list of commands that you can use.

I hope you find these scripts useful. Also, I’d love to see what scripts you guys are using, too.

Special thanks to @EttVenter for telling me about the awesomeness of AutoHotkey, and @brskln, who’s recent tweets inspired this blog post.

Read my other post for a few more scripts to make your life easier.

Look mom, no mouse!

Posted: October 13, 2010 by jellymann in computers, keyboard, mouse, tech

Using a computer with no mouse isn’t as hard as you think… if you think it’s hard. Pretty much every program has shortcut keys, as well as windows itself, and they pretty much do everything. Obviously you lose a few features like being able to draw stuff and play certain games.

Here’s the thing: Using the mouse requires you to move it, and the bigger your screen, the more you have to move it to get to places. Think of those massive 30″ Apple HD Cinema Displays, the distance between the menu bar and the dock is outrageous. The cursor has to pack a suitcase and padkos before it goes on it’s vacation to South Desktop.

The keyboard, however, has not changed its basic size since it’s conception due to the fact that the human hand has retained its overall dimensions. Moving your hand across the keyboard to reach a certain key can take split-seconds.

Some of the first keyboard shortcuts were introduced by Apple, of course because they are like the king of user interfaces. Here are some of the most used Command (or Apple) Key shortcuts:

+Q quits the current program (like totally quits it)
+W closes the current window (doesn’t quit the program, though)
+T opens a new tab in Safari, Firefox, Chrome.
+Space opens a quick search with spotlight.
Shift+Command searches through menu items.
+Z undoes what you just did (resembles the action of striking out a mistake)
(+X cuts the currently selected text/item (resembles a scissors) basically like copying and then deleting the original) This has been removed from Mac OS?
+C copies the currently selected text or item
+V pastes the currently copied or cut text or item (resembles an arrow pointing downward “into” the document/folder/whatever)

Although some of the letters have some sort of “meaning”, isn’t it oddly coincidental that all of these keys are in one continuous line right next to the Command button? meh… Maybe the guy who invented the QWERTY Keyboard knew about this.

Windows computers have their not-so-all-powerful Windows Key (or WINKEY, which is a pretty bad name depending on how you read it). Now that I think about it, the Windows Key is probably the least used function key on the keyboard, for the average computer use that is. Here are some of them.

Just pressing the Windows Key by itself it opens the start menu
+D shows the desktop, press it again to bring all your windows back.
+M minimizes all windows.
+Shift+M unminimizes all the windows you minimized with the previous shortcut.
+R opens the run dialog.
+E opens an explorer window at “My Computer”.
+F opens a search window.
+Tab cycles between taskbar items.
+Shift+Tab .smeti rabksat neewteb selcyc
+L locks the computer.
+U opens the utility manager, for stuff like the magnifier, Microsoft Sam’s annoying text-to-speech and the the on-screen keyboard.
+Pause opens System Properties.
Windows 7 added a bunch more:
+1…9 opens or activates the first nine programs on the “Superbar”.
+G cycles through desktop widgets.
+Arrow Keys manipulates the size and position of the active window. Play around with it, you’ll get the idea.
+Home minimizes all but the active window.
+Space makes all the windows transparent (like mousing over the “show desktop” button).
+Tab doesn’t do the same as XP, but rather activates that silly Aero Flip or whatever it’s called.
+T does what WIN+Tab does in XP.
+B switches focus to the system tray.
+Plus zooms in
+Minus zooms out

Not to mention all the useful shortcut keys that don’t use the Windows Key:

Alt+F4 is everyone’s favourite, isn’t it? Easy to use, it has one basic function: Quit! It also brings up the Shut-down dialog when no window is in focus (like when you’ve quit all your programs with it already! Muahahahaha!!)
Ctrl+Esc opens the start menu. I only ever used this on an old IBM laptop which didn’t have a Windows Key, which is very frustrating since I rely on so many Win+ shortcuts…
Alt+Tab switches between windows. In Windows 7 and some Linux distros, all other windows except the one selected will be visible during the switch.
Alt+Shift+Tab .swodniw neewteb sehctiws. You get the idea?
Alt+Enter does different things depending on the program. In explorer and Internet Explorer, it displays the properties of the selected file or webpage respectivly. In most games it toggles full-screen/windowed mode (e.g. Far Cry 2, DOSBox, etc.)
Ctrl+T opens a new tab in Internet Explorer, Firefox, Chrome, Safari, Opera, etc…
Alt+Space is like right-clicking on the title-bar.
F1 for help.
F2 renames selected file.
F3 for finding stuff, like words in documents and webages. Also “Find Next” while you are finding something.
F4 activates the menu bar of a window. Windows Explorer, Internet Explorer and a few other programs have the menu hidden, F4 shows hidden menu bars. The Alt by itself also shows hidden menu bars while activating them.
F5 reloads/refreshes the page.
F8 opens Windows boot options (like Safe Mode, etc) when pressed during Windows boot.
F11 makes Windows Explorer, Internet Explorer, Firefox, and other web browsers full screen, otherwise known as ‘Kiosk’ mode.

And don’t forget that little key which opens the right-click menu. I find it very useful sometimes.

There are still hundreds more useful (and useless) shortcuts out there. Most are for specific programs (like the “F” keys in Corel Draw)

However, you are by no means limited to these shortcuts alone. There is an amazing utility called Autohotkey which allows you to create your own shortcuts for literally anything on your computer. It goes beyond keyboard shortcuts, as it also has features for the mouse and joysticks.

Let me know if there are any common, useful shortcuts I missed out. I have a feeling I’ve missed at least one very important one. lol

I would post some of my Autohotkey scripts, but my computer with all of them is broken. I promise to post all of them when it’s up and running again.