Giter Site home page Giter Site logo

alexmohr / keyboard-backlight Goto Github PK

View Code? Open in Web Editor NEW
14.0 2.0 3.0 35 KB

Controls the keyboard backlight of notebooks to conserve power by turning keyboard backlight off when not in use

License: MIT License

CMake 12.29% C++ 81.74% Shell 5.97%
thinkpad cpp17 linux keyboard backlight

keyboard-backlight's People

Contributors

alexmohr avatar konradmb avatar

Stargazers

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

Watchers

 avatar  avatar

keyboard-backlight's Issues

Keyboard not detected (MacBook Pro Early 2015)

Hello, thank you for this very useful program.

The keyboard is not detected on my MacBook Pro Early 2015.

cat /proc/bus/input/devices
I: Bus=0003 Vendor=05ac Product=0273 Version=0110
N: Name="Apple Inc. Apple Internal Keyboard / Trackpad"
P: Phys=usb-0000:00:14.0-5/input1
S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.1/0003:05AC:0273.0004/input/input6
U: Uniq=D3H50965291FTV3AG2PS
H: Handlers=sysrq kbd leds event6 
B: PROP=0
B: EV=120013
B: KEY=10000 0 0 0 1007b00011007 ff9f217ac14057ff ffbeffdfffefffff fffffffffffffffe
B: MSC=10
B: LED=1f

The problem is that the word "Keyboard" is capitalized in the "Name" line so the program doesn't detect the keyboard if I don't modify the kbd_backlight.cpp file before compilation.

‘sleep_for’ is not a member of ‘std::this_thread’

...
[ 50%] Building CXX object CMakeFiles/keyboard_backlight.dir/kbd_backlight.cpp.o
/home/milk/.cache/yay/tp-kb-backlight-git/src/keyboard-backlight/kbd_backlight.cpp: In function ‘void brightness_control(const string&, long unsigned int)’:
/home/milk/.cache/yay/tp-kb-backlight-git/src/keyboard-backlight/kbd_backlight.cpp:248:35: error: ‘sleep_for’ is not a member of ‘std::this_thread’
  248 |                 std::this_thread::sleep_for(sleepTime);
      |                                   ^~~~~~~~~
make[2]: *** [CMakeFiles/keyboard_backlight.dir/build.make:76: CMakeFiles/keyboard_backlight.dir/kbd_backlight.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:137: CMakeFiles/keyboard_backlight.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
==> ERROR: A failure occurred in build().
...

Mouse detection bug

Hi, great application!

I've noticed a bug when deploying this application in fydeos, but on reviewing the source, I see a possible bug in the -M choices 0,1,2.

I've not seen this issue on fedora, ubuntu etc and even brunch, but I think it must be down to the driver being used.

Basically, in 0 (default) the code was missing my: -

/dev/input/by-id/pci-0000:00:15.0-platform-i2c_designware.0-event-mouse -> ../event9

I think it relates to https://github.com/alexmohr/keyboard-backlight/blob/master/kbd_backlight.cpp#L473

I was able to workaround by specifying -m 1 (internal only), but really, option 0 should pick this up.

Notes

Notes

  • Keyboard event cat by-path/platform-i8042-serio-0-event-kbd

Does not detect keyboard

The program does not detect my Lenovo Thinkpad X270's integrated keyboard as a device which can turn the backlight back on after it has been turned off. All mice devices lights it up correctly.

In the help menu it says:
-i ignore an input device
This device does not re enable keyboard backlight.
Separate multiple device by space.
Default: use all mice and keyboard.

So I assume that it should use keyboard pressing as a trigger too, right?

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.