GithubHelp home page GithubHelp logo

autokbisw's People

Contributors

elwanderero avatar jeantil avatar ratkins avatar trefex 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  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  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

autokbisw's Issues

rookie question!

How do I use this?

I can't see any binaries in the repository... I'd like to use this as I have an internal British keyboard and external British PC keyboard.

Unfortunately I am not familiar with xcode or swift.
Many thanks

Doesn't seem to be working with Mojave

Hi, thanks for this... it is exactly what i was looking for!

However, it doesn't seem to be working in my setup. I am using Mac OS Mojave v10.14.1 and have the software installed via homebrew. It was added to the homebrew startup list and is verified as running.

Forgive me if I'm being dumb but that's all that should need doing right? It's just not switching when a different keyboard is used.

Happy to help in any way i can.

Multiple external keyboards

Do you think it could be possible to manage 2 external keyboards?

Currently it only remembers the settings for 1 external keyboard, even when 2 are used.

Cheers,

Work with Karabiner-Elements

Is it possible to make it work with karabiner-elements? I checked the code and it seems autokbisw is detecting layout through the device code, I'm not sure if Karabiner is sending the proper layout code though.

Xcode requirement ?

Do we really need to install the full Xcode bundle? It's really heavy in terms of GB for my laptop.

Install with brew faild on MacOS 11.6

Hi
I try to install autokbisw on MacOS 11.6 with brew and it faild with

Cloning into '/usr/local/Homebrew/Library/Taps/jeantil/homebrew-autokbisw'...
remote: Enumerating objects: 34, done.
remote: Total 34 (delta 0), reused 0 (delta 0), pack-reused 34
Unpacking objects: 100% (34/34), 9.79 KiB | 417.00 KiB/s, done.

Error: Invalid formula: /usr/local/Homebrew/Library/Taps/jeantil/homebrew-autokbisw/Formula/autokbisw.rb
autokbisw: undefined method 'cellar' for #<BottleSpecification:0x00007ff19d8a8db0>
Error: Cannot tap jeantil/autokbisw: invalid syntax in tap!

On my Mac is this version of ruby
ruby --version
ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-darwin20]

Any hint ?

Sees two BT Magic Keyboards as the same device

For me this would be great, if it didn't see both my keyboards as the same device.

Tried using this with two apple magic keyboards, unfortunately they follow the same rule.. ish. There is alot of flickering of the flags in the menu (seems like it toggles back and forth several times per keypress)

Anyone successfully got this scenario working?

Unfortunately, not working with my setup

Hi Jean,

Unfortunately, or maybe I missing something, the switch does not operate on my setup

  • MBP
  • macOS Catalina
  • Installed with Brew (with Xcode)
  • Using either MBP (Azerty) or USB Vortex Mechanical Keyboard (QWERTY)

I've tried a few times using sublime text to switch from MBP keyboard or USB one... without success..

I just want an automagic switch between input source/keymap.

Do we have any troubleshooting procedures or verification steps to do a diagnostic?

> ps ax|grep autok
98748   ??  S      0:00.04 /usr/local/Cellar/autokbisw/1.2.0/bin/autokbisw
99076 s004  SN     0:00.02 sudo autokbisw
99095 s004  SN     0:00.03 autokbisw

Thanks,
Victor

Forcing layout?

Soooo, I can't figure out why, but having this installed … it looks like I can't change my layout, for a given input device, ever again?

I have autokbisw installed, and registered with LaunchD. I have an external, Colemak-layout mechanical keyboard, that I use at work; autokbisw keeps my macOS layout set to U.S. while using my hardware-Colemak board. I -also- use my work laptop on the go; when typing on my internal keyboard, autokbisw sets my macOS layout to Colemak.

Problem is, today, after a couple weeks of happily using this setup, I tried to install and run a game on this laptop. I switch to U.S. keyboard layout … open the game … and try to WASD around. No dice. I tab back out, and … the macOS layout is back in Colemak, even though I manually changed it? I try switching it to U.S. (success), ⌘␣ to try it out … and watch the macOS input-source in my menubar immediately switch back to Colemak as soon as I touch my keyboard.

tl;dr Am I missing something? I thought autokbisw was supposed to only change my layout when I used a different keyboard; not keep switching it while I'm on a single keyboard, even when I try to manually override it.

OSX login

Hello

First thanks for this tool. I'm wondering if this script could work in this scenario:

  1. Use a Qwerty keyboard and US layout
  2. Turn in sleep mode the mac and unplug the keyboard
  3. Wake up the mac and try to type the password from the laptop keyboard in Azerty (no more keyboards are plug)

Thanks in advance

Propose a plist for users to start autokbisw as a user agent

To have a programm started in the background automatically in osx there are 4 options according to Table 1-1 in https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/DesigningDaemons.html#//apple_ref/doc/uid/10000172i-SW4-BBCBHBFB

From that table I think the correct choice for autokbisw would be a "Launch Agent" . According to the documentation

It loads the parameters for each launch-on-demand user agent from the property list files found in /System/Library/LaunchAgents, /Library/LaunchAgents, and the user’s individual Library/LaunchAgents directory.

So autokbisw needs a plist that can be put in one of these 3 folders. Most likely as this is a user specific choice in ~/Library/LaunchAgents.

Project migrated to new repository (was Working build on Monterey)

I'm relying on autokbisw for my daily work so it was a bummer when it didn't work anymore after upgrading to Monterey. So I went and fixed it ;-)

Please have a look at my fork over at https://github.com/ohueter/autokbisw, see the updated README for building and installation instructions and give it a try. I've never worked with native macOS development and Swift before, so if something doesn't work, let's try and find a solution together :-)

Apple M1: can't install via Homebrew

Hello,
first of all many thanks for all you've done!

I've just changed my Intel MacBook for the new M1 MacBook and it seems that autokbisw can't be installed using Homebrew:

I've run "brew install jeantil/autokbisw/autokbisw" and here there is the error


....
swift
build
-c
release
-Xswiftc
-static-stdlib
--disable-sandbox

Fetching https://github.com/apple/swift-package-manager
Cloning https://github.com/apple/swift-package-manager
Resolving https://github.com/apple/swift-package-manager at 0.3.0
[1/2] Compiling clibc libc.c
:0: error: -static-stdlib is no longer supported on Apple platforms
Do not report this issue to Homebrew/brew or Homebrew/core!

Cannot build with Swift4

I cannot get to build the project with Xcode 9.2 and Swift4, I get a warning on autokbisw that tells me to conver to swift4 and the error below:

schermata 2017-12-13 alle 13 45 24

Stops working after sleep

I have a 2020 13 inch MB pro running Mojave with EN KB and an external Spanish Apple BT keyboard. It launches at startup no problem, but after the machine goes to sleep, autokbisw stops working... the executable is running, but won't change the input source anymore. I end up having to run it manually and the ps output is:

501 641 1 0 9:06AM ?? 0:05.35 /usr/local/bin/autokbisw
0 3486 3466 0 12:27PM ttys000 0:00.09 sudo ./autokbisw
0 3487 3486 0 12:27PM ttys000 0:02.97 ./autokbisw

Some console log entries:

default 14:49:37.339998 -0500 autokbisw IOHIDDeviceClass::buildElements: type=1 *buffer=7fa076d5abc0 *count=4 size=384
default 14:49:37.340305 -0500 autokbisw IOHIDDeviceClass::buildElements: type=0 *buffer=7f8040e5aaa0 *count=9 size=864
default 14:49:37.340834 -0500 autokbisw IOHIDDeviceClass::buildElements: type=1 *buffer=7f8040c6baf0 *count=4 size=384
error 14:49:58.462046 -0500 kernel autokbisw is not entitled for IOHIDLibUserClient keyboard access
error 14:49:58.462050 -0500 kernel autokbisw is not entitled for IOHIDLibUserClient keyboard access

Triggered by mouse?

Great little tool for my MBP for correcting the layout of my USB keyboard when it's plugged in, however I also have a logitech USB mouse and autokbisw also seems to be assigning a keyboard layout to that whenever I click!

Here's a log of my typing on both my keyboards and clicking my mouse:

starting with useLocation:false - verbosity:1
set input source to <TSMInputSource 0x7f9f35003740> KB Layout: British - PC (id=250) for keyboard Optional(Dell USB Keyboard)-[Optional(16700)-Optional(8195)-Optional(Dell)-nil]
set input source to <TSMInputSource 0x7f9f35002fa0> KB Layout: British (id=2) for keyboard Optional(Apple Internal Keyboard / Trackpad)-[Optional(1452)-Optional(635)-Optional(Apple Inc.)-Optional(FM783050239J3VYAX+RCP)]
set input source to <TSMInputSource 0x7f9f35003740> KB Layout: British - PC (id=250) for keyboard Optional(Dell USB Keyboard)-[Optional(16700)-Optional(8195)-Optional(Dell)-nil]
set input source to <TSMInputSource 0x7f9f35003740> KB Layout: British - PC (id=250) for keyboard Optional(Gaming Mouse G402)-[Optional(1133)-Optional(49278)-Optional(Logitech)-Optional(6D93279B5255)]

Is there any way to exclude the mouse from having its own layout?

cp: bad substitution


bash-3.2$ cp ${le chemin ci-dessus} /usr/local/bin/
bash: ${le chemin ci-dessus}: bad substitution
pwd

[.....]/Users/jean/dev/opt/autokbis

ll

total 10676
-rwxr-xr-x 1 bao3 10929376 Dec 19 18:16 autokbisw

How to resolve it ?

Installation from binaries issue

Part of the command "launchctl" is apparently deemed legacy.

It leads to the following message in Terminal:
Load failed: 5: Input/output

Using first launchctl unload path/to/plist and then launchctl load path/to/plist does not return the error, but also does not seem to make the binary work.

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.