Missing Shortcuts: Post them here
rbreaves opened this issue · 35 comments
Please provide the following information in this format.
What it does: Multi-cursor Up/Down in Sublime Text
Mac hotkey: Ctrl+Shift+Up/Down
Win/Linux hotkey: Alt+Shift+Up/Down
Mention anything you believe is relevant such as conflicts created by distros own hotkeys, etc.
Also note that users can always update their own kinto.py or kinto.ahk files and I will accept PRs that provide the correct remappings.
Will try to maintain an unorganized table here of keys being added as they are being added. Note keymaps will always be available to one version before the documented one - because it refers to future official releases, not the current release & the commits I make to it leading up to a new version.
Original Key Combo | Description | What You Press | What it Does | Date Added | Version |
---|---|---|---|---|---|
Fn-Enter | Insert | RAlt-Enter | Insert key | 1/10/21 | 1.2-6 |
Firefox: cmd+,
to open settings: https://osxdaily.com/2014/08/07/open-preferences-keystroke-mac-apps-os-x/
That'd be Alt+Home on the Windows/Linux side.
Actually Alt+t, o
@ukutaht I can't test this right away, but if you want to try and I have made an update on the Dev branch to include what you have requested.
@rbreaves to update my kinto do I need to uninstall, git pull & then install again? Or is there a quicker way?
TLDR;
Uninstall not needed; yes to git pull & maybe 'git fetch --tags' & install again.
Installing on top should work on either Windows or Linux most of the time, particularly within a given major release. E.g 1.2-x but maybe not 1.2 -> 1.3.
I often test both methods, on top & uninstalling, reinstalling, but not always & sometimes I just manually copy over the difference.
I probably should create a 3rd method that tries to let users keep their existing setting - assuming they’ve made some custom changes.
Nice, Cmd+, for settings and Cmd+Option+i for inspector work OK on my machine now. Thanks!
What it does: Reopen Last Closed Tab in Chrome/Brave (currently assigned to Ctrl-Shift-T in linux)
Mac hotkey: Cmd-Z
Win/Linux hotkey: Ctrl-Shift-T
In Safari on Mac I'm used to Cmd-Z to undo/reopen the last closed tab. Would be great to have the same shortcut available in Chrome/Brave on Linux without resorting to the ungainly Ctrl-Shift-T.
@eperitus Can you confirm if that behavior holds when you have a text field highlighted? That is the only issue when implementing shortcut keys for browsers. I used to could detect caret/text cursors, but moving over to xkeysnail has removed that ability until I re-implement it.
Can confirm Safari behavior does not reopen last recently closed tab if text field is highlighted.
@eperitus I probably need to refocus my efforts on re-introducing the ability to detect input caret/cursor status before I can properly implement this request as I fear something ubiquitous as Cmd+Z could often be used within the browser and not intend on re-opening a prior tab.
Only reason it was removed was because of the complexity or python stack that xkeysnail uses. And tbh even the implementation I had could have been better refined to use dbus signals I suspect. This is addressing the problem on Linux of course, I don't even have a model worked out for Windows yet.
# Keybindings for Eclipse
define_keymap(re.compile("Eclipse", re.IGNORECASE),{
K("Super-Space"): K("LC-Space"), # Basic code completion
K("Super-h"): K("LC-h"), # search
}, "Eclipse")
Using kinto.sh installed on Ubuntu 20.04 LTS on laptop w/ windows keyboard and external windows keyboard, using kinto.sh to give me back MAC keyboard shortcuts everywhere.
I needed to add these to be able to press the normal mac keyboard shortcuts and have them do their commented actions with the default shortcuts in eclipse.
Other shortcuts such as ''CMD Shift G for searching occurances, and CMD D for deleteing a line, CMD T for looking at types, as well as CMD C and CMD V for copy paste all worked already.
@eperitus I believe I know of a new method I can use to restore the last tab opened while still detecting if a text field has the focus or not. I should be able to implement this method on both Windows and Linux and merge it into master in the coming days.
Despite it being a little hacky it is actually pretty eloquent I think. I basically just see if I can quickly capture a single character into the clipboard, and if I can then I know I am focused on a text field within a browser. This only applies to browsers so the check doesn't effect anything else or any combos besides those that may have natural conflicts.
Adding support to Windows was quick and easy, Linux will be a little more difficult but mostly because I need to test this against multiple distros and make sure xbindkeys, xdotool and xclip come down properly across all package managers. Besides that though most of the setup shouldn't be too bad. There will be an extra step of using xbindkeys to create a completely new binding so that it can then reroute to the correct binding. I think that will at least be initially easier than trying to update xkeysnail to do what I want via python as it is really more of a 1 to 1 remapper and doesn't handle scripting logic so well.
It does mean that hotkeys may now exist in 3 config files on Linux instead of one, but given the simplicity of the solution versus trying to update xkeysnail I think I can live with that to bring some one off hotkey combos to Kinto.
@eperitus The code for Back/Forward/Tab Close Undo has now been written for Linux as well, but I will have to work out the dependencies and full testing for the various distros a bit later.
I am not sure that it works quite as smoothly as the Windows variation but that may just be because of my low spec VMs I am testing under atm. It should be more reliable than my earlier IBus method - even though that was more direct than this method.
What it does: Close/exit terminal / ssh session /
Mac hotkey: Ctrl+d
Win/Linux hotkey: ctrl-z, return (i guess)
Seems like "cmd-z, return" works.
What it does: Open file / run program from explorer/finder
Mac hotkey: Cmd-o
Win/Linux hotkey: enter
Is it possible to link this hotkey for opening files?
(Linking ENTER to rename files as well might be stretching it too far?)
How do I activate CMD + Backspace to delete the entire line from the cursor until the line's beginning?
Update: Thought you were familiar, Fedora user. I'll need to run some tests I guess. I am not sure why that remap wouldn't work though.
@matheustavaresdev You'll need to give me more info than that - what OS/distro are you using and is this non-working behavior in all apps or just a particular app(s)?
Cmd+Backspace appears to be working fine for me under Linux and Windows.
Im using Fedora 33... When I press "CMD" + backspace it functions like alt+backspace on mac...
Right now, ALT + Backspage / CMD + Backspace do the same action. I was able to make it work by pressing SHIFT + CMD + BACKSPACE to delete from the cursor to the line start point, but that would work only on Chrome, slack and maybe some other apps, but not on VS code unfortunately.... Not sure why though... On VSCode I was able to press sometimes a combination of SHIFT+ALT+CMD+DEL to make it delete the entire line, but this wasn't always triggering, I had to try many times pressing those keys like crazy to make it work....
I even looked at the main shortcuts file but had no luck understanding a thing there... That's why im posting here... If I had any clue it would make it easier for me to look around perhaps..
Notes:
When I say CMD I mean, normal keyboard left ALT, which is the CMD position on mac keyboard.
When I say ALT, I mean, normal keyboard left WINDOWS key, which is the ALT position on mac keyboard.
@matheustavaresdev vscode tends to create a few issues with alt/cmd+arrow keys. Personally I apply a Sublime Text 3 keymap in the app and then I create an editors group with both sublime and vscode in it, that's not really a great option for users though that want the real vscode hotkeys.
Updating the settings.json for the specific keymaps you are wanting in vscode may be the only 100% reliable way of getting the arrow key stuff to map the way you want unless I find a better way. So far I have not made any exceptions to applying remaps outside of Kinto and I'd like to try and stick to that. Disabling a conflict though or fixing a system level issue on xfce is a different matter though.
Alright! After your update, CMD + Backspace didnt do anything on VS Code anymore. I have added a shortcut to it though, and now it's working as intended! Thanks for the tip!
The shortcut I added:
> ~/.config/Code/User/keybindings.json
{
"key": "ctrl+shift+backspace",
"command": "deleteAllLeft",
"when": "editorTextFocus"
}
PS: Adding Sublime Text Keymap to vs code didnt help on that shortcut though... So Im not using it...
PS2: Shortcuts that are working for me to become as close as possible as a mac experience for VS Code as of now (that's all I missed from mac though... ):
[
{
"key": "alt+up",
"command": "editor.action.moveLinesUpAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "alt+up",
"command": "-editor.action.moveLinesUpAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "shift+alt+up",
"command": "editor.action.copyLinesUpAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+shift+alt+up",
"command": "-editor.action.copyLinesUpAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "shift+alt+up",
"command": "-editor.action.insertCursorAbove",
"when": "editorTextFocus"
},
{
"key": "shift+alt+down",
"command": "-editor.action.insertCursorBelow",
"when": "editorTextFocus"
},
{
"key": "shift+alt+down",
"command": "editor.action.copyLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+shift+alt+down",
"command": "-editor.action.copyLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "enter",
"command": "renameFile",
"when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !explorerResourceReadonly && !inputFocus"
},
{
"key": "ctrl+shift+s",
"command": "workbench.action.files.saveAll"
},
{
"key": "ctrl+shift+s",
"command": "workbench.action.files.saveFiles"
},
{
"key": "ctrl+shift+s",
"command": "saveAll"
},
{
"key": "ctrl+alt+s",
"command": "workbench.action.files.saveAll"
},
{
"key": "ctrl+alt+s",
"command": "workbench.action.files.saveFiles"
},
{
"key": "ctrl+alt+s",
"command": "saveAll"
},
{
"key": "ctrl+shift+backspace",
"command": "deleteAllLeft",
"when": "editorTextFocus"
}
]
@matheustavaresdev Heh, you are right the update did not help with vscode - even though it did solve it for sublime text 3 and practically every other text field in the OS 😅. Some things probably could be hacked around with to emulate it - but what you have done is likely best as it would be 100% stable and reliable. I will test with sublime text 3 remaps later under linux, I was just stating what worked for me under windows, but not sure about that specific combo.
Ohh gotcha! Hahaha yea maybe would work in windows... I dont use it to test it though... But thank you A LOT for your work man!!! It has greatly helped me migrating from mac to linux haha 🤩
Hi @rbreaves ! It's me again! Man Im sorry for bothering you so much haha I will try and send you some donation soon! So, I have recently discovered Yakuake
terminal for linux, and I enjoyed the idea of being kind of always on... But none of your shortcuts are working on it! :'( On Konsole and every other program I have tested is working just fine, but not on that one... I tried many stuff but not sure why it's not working... Do you have any idea if it needs some kind of special config for some terminals to work properly?
@matheustavaresdev No problem at all.
I am guessing you need to update line 10.
https://github.com/rbreaves/kinto/blob/master/linux/kinto.py
~/.config/kinto.py
terminals = ["yakuake",...]
If that does not work then run xprop -spy
and see what the wm_class name is and use that instead. That is kinda funny though that I never bothered to test that 1 terminal lol. I am sure there are more out there that got missed but I've added quite a few as have a few other users via PRs.
No Problem! Haha! Yea! Indeed it did work!! Thanks a lot again! 🤩
2 things missing in Linux that I noticed are:
- Paste as plain text: Supposed to be Option+Cmd+v, which is Win+Alt+v but it works as Shift+Alt+v now.
- Chrome back/fwd shortcuts: Supposed to be Cmd+[ and Cmd+] but I cannot figure out what the current shortcut in Kinto is.
Thanks for the hard work!
One of my most missed Mac keyboard features is the use of Option as a modifier key to access a third and fourth level of characters for each key. For example:
- [Hyphen] enters a hyphen (-)
- [Shift]+[Hyphen] enters an underscore (_)
- [Option]+[Hyphen] enters an en dash (–)
- [Shift]+[Option]+[Hyphen] enters an em dash (—)
[Option]+[4] enters ¢, [Option]+[8] enters •, [Option]+[G] enters ©, etc.
Interestingly, in Ubuntu's settings I can select a Macintosh keyboard layout, and then on my laptop PC keyboard right Alt is mapped to this typing behavior (and only left Alt then behaves as Alt). With Kinto in place, however, even this seems to be lost.
It would be wonderful if Kinto could allow these characters to be typed using some modifier key.
What it does: Switch desktop spaces (Virtual Desktop)
Mac hotkey: Ctrl+Left/Right
Win hotkey: Ctrl+Win+Left/Right
Clear Terminal shortcut is missing
What it does: Clear the terminal
Mac hotkey: CMD+L
Linux hotkey: Ctr+L
But isn't working
Got two of them that I'm dearly missing. The only other mention I saw of this was in #434, but sorry if this was addressed elsewhere and I simply didn't see it.
What it does: Switch desktop spaces
Mac hotkey: Ctrl+Left/Right
Win hotkey: Win+Ctrl+Left/Right
What it does: Show an overview of all open windows and show the desktop switcher
Mac hotkey: Ctrl+Up
Win hotkey: Win+Tab
One of my most missed Mac keyboard features is the use of Option as a modifier key to access a third and fourth level of characters for each key.
I’ve implemented this for the standard US and “ABC Extended” keyboard layouts. With some significant caveats.
Using this config requires switching the keymapper utility from xkeysnail
to a fork called keyszer
to get the Unicode keyboard shortcuts to work. It also apparently needs iBus installed and working in KDE Plasma for the Ctrl-Shift-u Unicode shortcuts to be available, but in GNOME it works without any extra trouble.
Kinto will probably be migrated to using keyszer
sometime soon.
https://github.com/joshgoebel/keyszer
On the Windows side I’ve only implemented the US layout so far. But the ABC Extended layout is fully documented on my repo dedicated to this project.
Just discovered kinto after running my own (much smaller) AHK script on Windows 10. I was happy to find that once I configured my browser, just about everything worked as I expected, even stuff I hadn't bothered to add (too complex).
As a laptop touchpad user, one of the big ones I'm missing (that I think is a little tricky to get exactly right, and seems to sometimes cause stuck keys) is ctrl-click for right click.
What it does: Sends a right-mouse click (at cursor location)
Mac hotkey: Ctrl+(Left)Click
Win/Linux hotkey: ???
I had this implemented like this in my AHK:
;when ctrl+left mouse button is pressed
#LButton::
Send {Click, down, right}
Return
;when ctrl+left mouse button is 'up', not held anymore
#LButton Up::
Send {Click, up, right}
Return
To be fair, it sometimes caused mouse-stickiness, which was really unpleasant (I think AHK would miss the "UP" event ...). I'm hopeful someone with a better understanding of the AHK event system/hooks could improve it. :)