Solitaire – Casual Collection

A collection of my favorite Solitaire games built with Unity.

I’ve always been a fan of card games and how versatile a simple deck of cards can be. Solitaire in particular is a great way to pass some time. Whether on a flight or lounging around on a rainy Sunday, each game offers a new puzzle to be solved.

While everyone knows the basic Klondike version of Solitaire that’s been around for ages, most are not aware of the various variations that can challenge you in different ways and keep you engaged for longer periods of time without becoming monotonous.

As I’ve discovered these variations, I’ve naturally wanted them available on whatever device I am using. While many Solitaire games exist on various platforms, not many have all the variations that I enjoy, and most stray far enough away from physical game play (timers, artificial scores, tacky visuals and sound effects, ads, etc.) to become distracting and less enjoyable than the casual, cathartic play associated with handling a physical deck of cards.

So when I decided to learn the cross-platform Unity game engine, the first project that came to mind was a Solitaire game that contained all the variations I loved with gameplay as minimally distracting and close to real world play as possible.

Solitaire – Casual Collection is that project and is available now in the Windows Store.

The game offers the most popular versions of Solitaire for free including Klondike, Spider, FreeCell, Pyramid, and Tri Peaks with many more of my favorite variations available for a small in-app purchase. These other variations include Aces Up, Acme, Acme II, Agnes Bernauer, Australian Patience, Baker’s Dozen, Baker’s Game, Betsy Ross, Black Hole, Blockade, Busy Aces, Calculation, Congress, Deuces, Diplomat, Eagle Wing, Easthaven, Eight Off, Four Seasons, Fourteen Out, Penguin, Scorpion, Scorpion II, Sir Tommy, Strategy, Thirteens, Thumb and Pouch, Wasp, Whitehead, Yukon, and any others that I’m sure I will discover and add over time.

For all games, the cards and game layout are front and center with minimal distractions and several affordances to make gameplay feel as realistic as possible including high resolution and realistic graphics, realistic audio effects recorded from physical cards, and natural card selection and movement with drag and drop and tap-tap support.

The game is currently only available in the Windows Store, but building it with Unity means I can easily publish the game to other platforms if I choose. I’ve learned a lot about Unity game development with this project and it’s great to have something tangible to show for it that can be shared with others (and of course used for my own enjoyment).

If you’re a fan of Solitaire like me and would appreciate a more casual and realistic version with access to lots of fun variations, give Solitaire – Casual Collection a try. I hope you’ll enjoy it as much as I do.

Customize Key Mappings on Surface and Other Keyboards

Configure a right Ctrl key, remap Caps Lock, and more.

As someone who uses keyboard shortcuts often to stay productive, comfortable access to the Ctrl key is a must.

The Surface Type Cover only offers a left Ctrl key which I find just disruptive enough to be a nuisance during everyday use.

Fortunately, Windows provides a (albeit obscure) mechanism to remap key bindings.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,1d,00,3a,00,1d,e0,5d,e0,00,00,00,00

The Scancode Map key (described in detail here) enables you to configure custom key mappings such that pressing a key on the keyboard generates the scan code of another key.

Given my limited use of the Context Menu key and its natural proximity to a typical right Ctrl key, I find that remapping the Context Menu key to right Ctrl is perfect. Remapping Caps Lock as an additional left Ctrl key offers even more comfortable access and mitigates the age old problem of inadvertent Caps Lock activations. Note: If you will miss lack of the Context Menu key, know that Shift + F10 is an equivalent alternative in many places.

The above Scancode Map value will configure these changes for you. Save the entire block to a .reg file (including the registry editor version header shown in the snippet), then execute the file to import the value into the registry. Reboot for the changes to take effect. Note: If you ever want to undo this change, just navigate to the Keyboard Layout key in regedit and delete the Scancode Map entry.

This Scancode Map has been available in Windows for ages so can be used to configure similar mappings in all kinds of keyboards (even for keys the keyboard doesn’t have). I use the below Scancode Map on my Microsoft Wired Keyboard 200 (a keyboard that lacks volume keys) to map Caps Lock to left Ctrl, PrtScn to Mute, ScrlLk to Volume Down, Pause to Volume Up, and Num Lock to null.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,06,00,00,00,1d,00,3a,00,20,e0,37,e0,2e,e0,46,00,\

This remaps Caps Lock as described above while also adding volume control to 3 keys I never use anyway. Note: Num Lock to null was necessary to remap the Pause key correctly but also is a righteous change in itself since I never use the Num Pad for anything other than number entry.

For a list of available scan codes to insert into the Scancode Map, I’ve found that the list maintained in the SharpKeys source code is the most reliable. Feel free to try out SharpKeys as well if you prefer to modify the Scancode Map registry key with a graphical interface.

Note: Windows used to reset the Scancode Map after an OS upgrade which was incredibly annoying for someone in the Windows Insider program who installs OS updates frequently. Fortunately as of build 14951, that is no longer the case:

We’ve updated our migration logic to now include custom scan code mappings. That means that going forward from this build, if you’ve used Registry Editor to remap certain keys (for example, Caps Lock key to null), that change will persist across upgrades.

All the more incentive to configure the keyboard the way you like it.

Disable Intel Display Power Saving Technology on Surface Pro 4

Stop your display from darkening unexpectedly even when adaptive brightness is disabled.

I recently bought a new Surface Pro 4. I run on battery often and configure the display’s brightness to 25% (with adaptive brightness disabled) to conserve battery.

With adaptive brightness disabled, my display would still occasionally darken or lighten unexpectedly, often to an uncomfortable level. After some experimentation, the trigger turned out to be what was visible on the screen. Darker content resulted in the display darkening, and lighter content resulted in the display brightening.

After some research, the culprit turned out to be Intel Display Power Saving Technology or DPST. The design of this Intel feature is precisely what I experienced: to save power by adjusting the display brightness depending on how dark or light the content on screen is.

While well intentioned, I found the experience incredibly disruptive given its slow and choppy transition and the uncomfortably dark end result. With my display brightness configured to 25% already, you can imagine how any darker might be uncomfortable, especially in adverse lighting conditions.

While on older desktops you could disable DPST via Intel’s driver configuration software, this software isn’t available on the Surface line with the recommended graphics drivers. While some might have success installing the latest available drivers and software from Intel directly, the steps can be complicated to replace the recommended drivers, and you risk introducing more problems with an untested configuration. My options seemed limited to living with it.

Fortunately, via work channels, I discovered an obscure registry key that can enable or disable Intel graphics features with the recommended graphics drivers.


The FeatureTestControl registry key is a bit field where each bit represents a feature. A value of 0 indicates the feature is enabled, and a value of 1 indicates the feature is disabled. The Intel graphics driver reads this registry key on initialization to determine which features to enable. The bit corresponding to DPST is the fifth bit from the right.

To disable DPST, you’ll need to set the DPST bit to 1. If the value of the registry key is 9240 as shown above, simply replace it with 9250. If the value on your system differs and you are unsure if DPST is already disabled, enter the existing hex value into Calculator’s Programmer mode (select HEX before entering the number) and switch to its bit toggling keypad to check the value of the DPST bit (position 4). If it is already set to 1, then DPST is already disabled. If not, click the bit to toggle it to 1, then copy the updated hex value into the registry. If updated correctly, the only number that should be different is the 4 (or whatever number was in that position), and it should be odd (or b, d, or f for the hex representation of 11, 13, or 15).

Reboot to ensure the graphics driver reconfigures itself, and DPST will be disabled.

Note: OS updates appear to reset the FeatureTestControl registry key back to its default value. If you notice that DPST has been reenabled, you’ve likely taken an OS update and will need to reconfigure the value in the registry again. Also, the registry key may be under […\0001] rather than […\0000] depending on the system and OS version installed.