rbreaves / kinto

Mac-style shortcut keys for Linux & Windows.
http://kinto.sh
GNU General Public License v2.0
4.44k stars 213 forks source link

Ran on GalliumOS, no effect #47

Closed Kikketer closed 4 years ago

Kikketer commented 4 years ago

Here's the output of what I ran following the git clone steps and the like. My keyboard is Chromebook. I'm using the built in keyboard (Chromebook keyboard) on my Chromebook so I assume option 3 then option 1 is the correct path to get this thing to behave like a Mac keyboard.

Simple request to just make the Overlay button be the Alt button so I can use my thumb to copy/paste/home/end. Per application bindings sounds fun but I'm willing to skip that for now just so that I can use my thumb.

Kinto - Type in Linux like it's a Mac.

    1. ❖  Windows 
    2. ⌘  Mac 
    3. ✇  Chromebook 

Please enter your keyboard type (1 - 3) : 3

1. Chromebook
Description: Standard Chromebook Keyboards
2. Chromebook - Windows
Description: Chromebook with Windows 104 Keyboard
3. Chromebook - Mac
Description: Chromebook with Mac Keyboard

Please enter your keyboard config (1 - 3) : 1

'./.xkb/symbols/chromebook' -> '/home/chris/.xkb/symbols/chromebook'
'./.xkb/symbols/mac_gui' -> '/home/chris/.xkb/symbols/mac_gui'
'./.xkb/symbols/mac_term' -> '/home/chris/.xkb/symbols/mac_term'
'./.xkb/symbols/mac_term_chromebook' -> '/home/chris/.xkb/symbols/mac_term_chromebook'
'./.xkb/types' -> '/home/chris/.xkb/types'
'./.xkb/types/mac_gui' -> '/home/chris/.xkb/types/mac_gui'
'./.xkb/types/mac_term' -> '/home/chris/.xkb/types/mac_term'
One time initialization tweaks are available. Would you like to view them? (Y/n) y

1. gnome-init
Description: Gnome - Remove Superkey Overlay keybinding to Activities Overview
run: gsettings set org.gnome.mutter overlay-key ''

2. kde-init
Description: KDE Plasma 5 - Removes Superkey Overlay from the Launcher Menu
run: kwriteconfig5 --file ~/.config/kwinrc --group ModifierOnlyShortcuts --key Meta ""
qdbus org.kde.KWin /KWin reconfigure

Please enter your init tweak(s) (eg 1 or 1 2 3 - leave blank to skip): 

Dynamic shortcut tweaks

1. Gnome Activities Overview
Description: Cmd+Space activates Activities Overview
run in gui mode: gsettings set org.gnome.desktop.wm.keybindings panel-main-menu "['<Ctrl>Space']"
run in terminal mode: gsettings set org.gnome.desktop.wm.keybindings panel-main-menu "['<Control><Shift>Space']"

Please enter your dynamic shortcut tweak(s) (eg 1 or 1 2 3 - leave blank to skip): 
1
Saved configuration to ~/.config/kinto/user_config.json

Now running keyswap_service.sh to setup the keyswap service...
Keyswap will be configured to run on user login

You may start, stop, restart or view the status of the service with following commands

systemctl --user start keyswap
systemctl --user stop keyswap
systemctl --user restart keyswap
systemctl --user status keyswap
Created symlink /home/chris/.config/systemd/user/default.target.wants/keyswap.service → /home/chris/.config/systemd/user/keyswap.service.
chris@chromebook:~/Documents/kinto$ sh keyswap_service.sh 
Created symlink /home/chris/.config/systemd/user/default.target.wants/keyswap.service → /home/chris/.config/systemd/user/keyswap.service.
chris@chromebook:~/Documents/kinto$ systemctl --user start keyswap
chris@chromebook:~/Documents/kinto$ systemctl --user restart keyswap
rbreaves commented 4 years ago

Everything you posted there looks good, and yes 3 then 1 would be the right path. I just reinstalled master on my galliumOS chromebook and I can't seem to duplicate a problem.

Awhile back there was an issue with the service file sometimes requiring the DISPLAY environment variable to be set, but a recent commit in master should have taken care of that. You can check though and make sure an Environment variable for DISPLAY has been set here.

nano ~/.config/systemd/user/keyswap.service

Can you also run either of the following?

# Monitor live output
journalctl -f --user-unit=keyswap.service -b

# View output statically
journalctl --user-unit=keyswap.service -b

# systemd status
systemctl --user status keyswap
rbreaves commented 4 years ago

I just installed it on a 2nd chromebook and it still looks like it works for me on 3.1 as well, and both the master and dev branch. Once you send me the logs though that should tell me something, but really it just sounds like it isn't running at all.

And really.. while I tend to often be rather verbose, the design of kinto is pretty simple overall. The focus is primarily on switching between two keymaps, gui and the terminal, because the basic key swap itself seems to resolve 90%+ of the main issue.

The addition of allowing for more apps/categoires was actually brought about by ElementaryOS's Terminal app with hardcoded shortcuts for Copy & Paste.. and then shortly after I implemented the ability for 3 or more keymaps I resolved the issue to where I was able to drop back down to 2 keymaps. The feature did get re-used for the web browsers pretty soon after.

rbreaves commented 4 years ago

Oh I may have misunderstood what you wanted as well.. I was assuming when you said Overlay that you meant the Control key more or less.. well yea I am not making use of the Overlay button really. I am placing the 3rd key, Super/Hyper up on the capslock position though while the user is in a GUI app, but it goes away completely during Terminal usage.

GUI Alt = Ctrl Ctrl = Alt Capslock/Search = Hyper/Super

Terminal Alt = Ctrl+Shift Ctrl = Ctrl Capslock/Search = Alt

If you want the Overlay key (search/capslock/hyper/super?) on Alt you can modify the files in the ~/.xkb/keymaps/ directory as that will determine the key initial key positions plus it contains my own modifications to make it more mac like. I am not really sure how having the Overlay key on Alt be more useful than having Ctrl on Alt or how that would make things more mac like than the approach I am using with Kinto. Kinto isn't really trying to be a scalpel, I am trying to fix things about as wholesale as I can and then fix the few things that may be a little off as it seems like less work in the end.

Kikketer commented 4 years ago

I seem to be alone in this fight, where I want to be able to use the muscle memory of my mac keyboard with my chromebook + linux. Seeing the troubles this has caused and all of the customizations that it requires, I'm going to walk away from Linux again for a few years. I think I just need to suck it up and stick with mac.

Here's what I've done to make Windows act appropreately and I've actually found this mapping to be quite good. I no longer need to think hard about what keypresses are needed to "highlight from my cursor all the way HOME (thumb + shift + left arrow)" or "thumb + left arrow = HOME". https://medium.com/@chrisdhanaraj/mapping-your-macos-keybinds-to-windows-b6009c50065b

Thanks for trying.

rbreaves commented 4 years ago

If you're able to give me the output of your systemd journal I am pretty sure I can work out what's going wrong I'd think. I have 2 galliumOS chromebooks, one on 2.1 and the other on 3.1, so I'd think I should be able to duplicate whatever is going on.

# View output statically
journalctl --user-unit=keyswap.service -b

Kinto really isn't doing anything too complicated or all that app specific, even though it is capable of it. It categories everything in 1 of 2 categories, plus the browser category (firefox/chrome).

And I don't really see that article for windows placing Super or some type of Overlay key on Alt, they're just placing Ctrl on Alt much the same way as I do here. Primary difference being that Kinto also appends Shift to that same key when using a Terminal by default to keep consistency and Ctrl-C for sigint as well. I guess I am just not really understanding what it is that Kinto is really lacking in duplicating the mac like behavior for you as any other method seems like it'd create more work.

rbreaves commented 4 years ago

It'd also be more difficult to remap keys under windows because based on how its registry and keyboard mappings work you can't refresh the keymap without logging off and back on. You'll have to map or remap the scan/keycodes differently than how sharpkeys does it, registry, if you want to duplicate mac or kinto behavior more closely as GUI and term apps change.

I may have bookmarked or noted a possible avenue for Windows awhile back, but it really just isn't a high priority for me. I don't live in a Windows world any more.

rbreaves commented 4 years ago

Closing ticket until more information is provided. There are no known issues in GalliumOS or at least any that I can reproduce. Will reopen if OP or any other users report & provide more information.