MrSimonC / Toggle-Mac-Function-Keys

This AppleScript allows you to automate the toggling of using Function Keys vs Media Keys on MacOS
MIT License
86 stars 15 forks source link

updated the keyboard shortcuts button to 3 #9

Closed hdecoded closed 1 year ago

hdecoded commented 1 year ago

In Mac os sonoma (14.0) the button 1 and 2 are assigned to keyboard brightness hence updating the button to 3 to click on keyboard shortcuts

I am not aware if this a change that occurred in 13.0 or 14.0.

Please let me know If I did something wrong I am very new to apple scripting

MrSimonC commented 1 year ago

Hello! Thanks for the pull request. Nothing wrong with your code, other than it'll currently break for everyone using 13.0 (lol including me). I'll take a look tomorrow / next day and I'll look into wrapping your code in an OS-version so that it can work for both 13 and 14. Bear with me :)

hdecoded commented 1 year ago

Thank you for your response, MrSimonC. I attempted to include if conditions for versions 13.0 and 14.0, but it seems that there is something I am overlooking. The if conditions are not functioning as expected.

MrSimonC commented 1 year ago

@hdecoded I've updated the code so it should work, but I've not got macOS 14 beta to test on... could you please try out this script and let me know if it works for you: https://github.com/MrSimonC/Toggle-Mac-Function-Keys/blob/feature/update_for_MacOS14/Toggle%20Function%20Keys.scpt

hdecoded commented 1 year ago

Yep it works flawlessly. Thanks for the update.

MrSimonC commented 1 year ago

Closing as other changes have been merged in via #10