Where can I find a list of Mac virtual key codes?

Below is a list of the common key codes for quick reference, taken from Events.h. If you need to use these keycodes in an application, you should include the Carbon framework: Objective-C: #include <Carbon/Carbon.h> Swift: import Carbon.HIToolbox You can then use the kVK_ANSI_A constants directly. WARNING The key constants reference physical keys on the keyboard. … Read more

NSAttributedString background color and rounded corners

I managed to achieve the above effect, so thought I’d post an answer for the same. If anyone has any suggestions about making this more effective, please feel free to contribute. I’ll be sure to mark your answer as the correct one. 🙂 For doing this, you’ll need to add a “custom attribute” to NSAttributedString. … Read more

tech