Skip to content

Instantly share code, notes, and snippets.

@schmich
schmich / ducky.md
Last active May 23, 2024 09:46
Programming media keys on the Ducky One 2 Skyline

Programming Media Keys on the Ducky One 2 Skyline

To use media keys on the Ducky One 2 Skyline, you must record a macro to bind the media function to a hotkey combination, i.e. Fn plus some key.

Example

Important: In the instructions below, "Press X+Y+Z" means press and hold key X, press and hold key Y, press and hold key Z in that order, and then release all three.

As an example, to bind Fn+PgUp to the play/pause media function:

;#NoTrayIcon
;#SingleInstance force
;#Persistent
;#InstallKeybdHook
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; Logitech T650 mappings for Windows 10.
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@gabehesse
gabehesse / EnumLabel.cs
Created June 1, 2011 16:53
C# attribute that allows string representation of enum members & an extension method to get that string representation from an enum member.
public class EnumLabelAttribute : Attribute
{
public string Label { get; private set; }
public EnumLabelAttribute(string label) { Label = label; }
}
public static class EnumLabelExtension
{
public static string GetLabel(this Enum @enum)
{