There is a good chance flirc will work out of the box to wake up your machine when a remote button is pressed. However, if this is not the case, you've come to the right place.
Download and install the latest GUI (see here for instructions)
Once you've gotten the latest GUI, open the app and select "Full keyboard controller"
Now click and pair the 'wake' button on the keyboard view with the button on your remote you want to use to wake up your machine.

Okay, you are almost done! Don't forget the last step, it's important. Now that this button is paired, let's enable the feature in flirc.
Head on over to the advanced configuration window:

Make sure "Sleep Detection" has a tick next to it

Now, whenever that previously paired button 'wake' has been pressed, a special wake up command will be sent to your machine only when your computer is sleeping.
if this is out of date what are the new steps?
Sorry about that, i've updated the text.
I the steps are still the same it's just the article kept referring to beta and RC releases when it is now available to everyone (I just had to double check).
I'll update the screenshots tomorrow.
Apologies for the confusion,
-Chris
Will this work on KodiBuntu?
With the latest version of Flirc I cannot tick the Sleep detection option
All Advanced options are actually grayed out. I'm using Windows 10 Home.
What gives?
When I assign the Wake button to a button on my remote, I get a message saying Recorded succesfully but the button does not work at all to wake the system.
If I use the wake key on another keyboard I have connected to the PC it works so the problem is isolated to Flirc
Advanced features are not available or needed for the new version.
There is an active forum discussion on waking up a windows machine with gen2
http://forum.flirc.tv/index.php?/topic/2369-flirc-disconnected-after-going-to-sleep/&page=8#comment-13736
Please sign up and join the discussion. I think I can reproduce this now and am working on a fix. The beta image will go on the forum.