-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doesn't seem to work on Elementary OS #5
Comments
It's having difficulty parsing your keyboard info. I need to change that part of the installer, in most cases I really don't even need the id's of either an internal or external keyboard. The issue
Quick work aroundUse vi or nano, or editor of choice and update this file
It should say 17 14 0, but an carriage return is being inserted after 14, breaking the install and I think that's the only thing broken.
If you need to stop and start the keyswap service
If you can run these 2 commands though I will review the output and update the installer to improve the parsing.
|
…ards, only chromebooks will make use of device id's for external keyboards. Closes #5
This issue has now been resolved. And an improvement to the parsing has been made for chromebook users that may need device id's of external keyboards. Further improvements to the parser may be made if the output of the above commands are shared. |
Could you provide me with the new layout you created? I believe I have another user that is German that experienced something similar, and if the keyswaps I am doing are not cross-compatible with US, French and German keyboards then I would like to fix it during the install if possible. |
Hi @rbreaves I wish I had replied to you because some system upgrade erased what I did in In fact I didn't use the mac keyboard anymore since I had access to a windows/linux keyboard every day. My son went by and broke my left control key, so now it's like I'm crippled in the terminal. I now use the mac keyboard, and this is how I noticed my keyboard layout was gone... So what I did to fix it today seems hackish, instead of creating a new layout (this is what I needed at that time when I had the mac and windows/linux keyboards alternatively every week), I modified Here's my edit:
The |
Thank you, that could be useful to know. Looks like I should be able to modify the layout easily enough in the users home directory and not touch the system level files.
After printing the default layout info into those directories my script then adds in the proper custom layouts and I can add another inside the gui and term based symbol files for various languages as needed. More ideally though I'd just like to create an actual app for the system tray and a gui that can make remapping things like this a simple affair. Linux has a decent underlying xkb setup, but it feels like very few have taken the time to simplify it on the same level as karabiner on macos. https://github.com/rbreaves/kinto/blob/master/.xkb/symbols/mac_gui |
@BenoitDuffez |
Indeed, 187 commits! I tried again and it seems very nice. I'll have to see how my muscle memory will work out. |
As long as the mac keyboard is an official Apple keyboard (macbook laptop) or Apple keyboard the linux hid driver should kick in and the setup will configure it to have the same layout as a Windows keyboard at that point. So what I am saying is yes, you should be able to use both keyboards and at the same time as long as you select #2 and then #1 in the setup. I did that very purposefully so that I could switch myself without having to go back through the setup. |
I got confused by the question the setup asked about that specifically. It's not an Apple branded keyboard it's Logitech. I have no idea what driver is used and if it's Linux hid. I just know that the two layouts are physically different and don't behave the same way. I'll run the setup again with these options and see how this works. |
Ah, I see then I am honestly not sure what’ll work best. If it has the command key in the right place then I’d pick “Mac Only” it specifies it’s for VMs & non-official Apple keyboards in the title now. (In the latest master) If it’s laid out Windows style though then pick Windows. (Although a person with a Windows could select Mac w/ hid driver & it ought to still work.. it’d just set driver settings that won’t matter.) |
It doesn't seem to do what I have on my mac. Bottom left layout of my keyboards: (❖ means windows key)
My mac with either the Logitech K750 or the laptop keyboard have the exact same behavior. My Elementary with choices 2-1 doesn't work, as I don't have the
I guess it's simply not possible and I'll keep using my Linux without Kinto and the default "Mac" layout on Elementary. This is what I have and I can cope with:
The only difference between HP keyboard and K750 keyboard is that meta and alt are swapped: The perfect world for me would be to use the same shortcuts for both mac and Linux on that second table. Also, I don't need to copy the terminal, as I use tmux and selection actually copies to clipboard. I paste with shift-inser most of the time, sometimes with mouse wheel, or sometimes with ⌃⇧V (depending on what clipboard I want to paste from). Also I remapped ⇪ (caps lock) to actually behave like control (both on mac and linux) as my shortcut for tmux is ⌃Q and on my azerty keyboard, Q is in front of ⇪. |
The logitech keyboard with the mac key layout should be following the 2-2 layout, assuming linux will not use the hid driver. The HP laptop however with a windows key layout should be using the 1-1 layout for Windows. The keyboard type only references your keyboard type, not the style it'll be mapping to. Kinto probably should remap Ctrl+Tab to Alt+Tab, as that does seem to be the universal hotkey btwn distros to switch apps and would bring it into alignment with macOS. The question then is where to relocate Ctrl+Tab, to the Alt+Tab or the Super+Tab position. I am leaning towards placing Ctrl+Tab on the Super+Tab position for the sake of sublime text in particular as that would place it back into the normal position to change tabs in Sublime and browsers. And then also place Super+Tab on the Alt+Tab position.
A little funky, but I think that would get the job done in a manner that makes the most sense. If there are some apps that don't like it then exceptions can be made for those apps easily enough. I am still not sure if there is a wordwise problem though, I can't seem to duplicate one, so I am wondering if for your HP keyboard if you had selected the Windows keyboard or not as that should sort out the keys to where wordwise would work (but I would have thought the same for 2-1 as well). Again 2-2 is the one that should work for the logitech, unless it did work with the apple driver then it'd be 2-1. |
This really falls into the Translation Table project I bulleted out in another Ticket - because I am not into making one off changes that may not carry over to a majority of other distros. I will begin work on the Translation Table between ElementaryOS and others. Anyone is welcome to make whatever one off changes they want to the xkb files or create new xbindkeys files, but Kinto, as an app, needs to focus on what I can comfortably confirm will be the same across distros or DE's shortcut wise. Extra logic can be added to the setup file though to use specific keymaps in various situations - but that just speaks to the care that needs to take place before making assumptions about shortcut keys from one distro or DE to the next. |
With this ticket being closed if you want to continue the discussion about shortcut keys we can do so in this open ticket. #44 @BenoitDuffez but I do hear you, app switching is pretty basic and needs to be aligned at the very least. |
@BenoitDuffez In this commit in Dev the in app tab switching should be fixed and the App Tab Switching is too with an exception.. You will have to update your DE, Gnome, KDE or whatever it is to use Ctrl + \ as the hotkey for app switching. I wish I could have done it differently, but with every attempt I tried it just appeared to fail to pickup properly. I think the xkb remap for some reason doesn't pass the held down modifier properly to the app switcher, but by keeping the hotkey on Ctrl it fixes that. Also the reason the App Switcher can't just be mapped from Alt+Tab or Super+Tab to Ctrl+Tab is that most in app tab switching occurs on Ctrl+Tab, so I have to avoid that conflict or we'd lose in app tab switching when you press the physical Ctrl+Tab (which is Super+Tab but maps to Ctrl+Tab in actuality so other apps don't need remapping, if I have to remap the DE vs individual apps I will pick the DE). Before making this an official release I will add a builtin tweak to remap Gnome, KDE, or XFCE properly so users don't have to setup Ctrl + \. |
I'll try that tomorrow. Meanwhile I have a question: what layout should I choose on the os settings? By default it would be french, which uses the same layout as the windows layout printed on the hp keyboard. However I have switched that to French (Mac) which changes some keys (like @ or ! or $). Before running kinto setup should I put Mac or default (windows) layout? I'm not talking about meta/alt/control. |
I am not sure, I am guessing you are talking about what comes back you type in?
I have never needed to change my keyboard from the English after the distro setup/install and have never specified Mac for even my official mac keyboard, but you can certainly try it either way. It should not impact the setup process at all, so you can change it after the fact just fine. One thing you may want to be aware of though is that I often reset the keyboard back to their defaults by running this command.
I don't really know how that impacts users that installed linux under a different language from US. I assume it defaults to their own language just fine, but you can replace that command in the defaults.json and/or user_config.json before or after the install. If you modify it after the install then it is just ~/.config/kinto/user_config.json. You can easily try other variations such as
If you need to do so, and please let me know if that helps any, because I simply do not know atm. |
I have Elementary OS (latest, up to date) and two Logitech K750 keyboards. One is windows layout, the other is mac. I used to use the windows one at work for linux, and the other one at home with my mac and my linux when working from home. I just had to create a new layout to swap @ and <, which for some reason were swapped.
I installed your script but it failed:
I tried to read the install script, the keyswap service script (I just added
set -x
to see what it does), but nothing worked. The keys were not swapped.The text was updated successfully, but these errors were encountered: