Git Product home page Git Product logo

fntoggle's Introduction

fntoggle

A very, very badly hacked together executable that can turn on and off function keys on my Retina MacBook Pro 15" (Mid-2012). What I'm saying is that it WORKS4ME and with ControlPlane.

At least it does not use GUI scripting with Applescript to accomplish this goal.

Usage

Media Keys

./fntoggle off

Standard Function Keys

./fntoggle on

Toggle state

./fntoggle

Note: You may need to toggle the state on or off explicitly before toggle previous state invokation can work.

Note that the original F9-F11 keys are most likely still bound to the Expose stuff. This simple program does nothing to address that.

References

https://github.com/schismtracker/schismtracker/blob/master/sys/macosx/ibook-support.c

http://stackoverflow.com/questions/6968677/cfnotificationcenter-usage-examples

https://bignerdranch.com/blog/notifications-part-2-handling-and-spying/

Known Issues

The Keyboard Preference Pane does not update with values set by this tool while running.

License

The Schism tracker code is GPL2 but wow a bunch of it looks to be the product of disassembling the Keyboard Preference Pane anyway like me. Regardless, this project could be GPL2.

fntoggle's People

Contributors

nelsonjchen avatar pyroh avatar tamsky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

fntoggle's Issues

Sierra support

Unfortunately it doesn't work on Sierra. The app returns "res: 0" or "res: 1", but actual fn state isn't changed.

Problems with fntoggle

This used to work for me, but I find that it doesn't work anymore. media keys are enabled all the time, after I run either fntoggle on and fntoggle off. I'm curious if it's only me?

Not an issue: this still works, with one command deprecated

This program is exactly what I have been looking for. Under Ventura on an M1 Mac, it creates a universal binary. There seems to be nothing else like it out there. Thank you!

Xcode says that one command is now deprecated; that probably won't matter for a long time, but I wonder if there's any way to update it.

Question: I've been trying to reproduce this in AppleScript but it's beyond my abilities. If you ever have a free moment and are willing to spell out how to do this in AppleScript, I'll be grateful, and so will other users.

Again, thank you for the only program that does this job without GUI scripting.

command not found?

hi

  • i placed in my Applications dir,
  • did chmod +x fntoggle, now it shows 'exec' icon
  • at command-line, did fntoggle on. I noticed Tab key did not autocomplete the app name.
  • getting

command not found

any suggestions?
thx

Provide a Homebrew formula

As the title say, it would be awesome if you could provide us with a Homebrew installation! ๐Ÿ˜„

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.