Why is the fish binding not working in mac os? - fish

I am trying to use some of the fish bindings and I can't make them work in my Apple sierra with both iterm2 and terminal.
For example, when I use Alt + d which is supposed to kill a word, it inserts the letter ∂
Am I missing something here?

You need to configure the terminal to treat the option/alt key as a "meta" key that prefaces the next key with an escape rather than a compose key. This doesn't really have anything to do with fish. If you used bindings in bash or zsh that expected [Alt-some_key] to work you'd see the same problem.
In iTerm2 open the preferences, go to "Profiles", then click the "Keys" tab. Near the bottom you'll see options to configure the left and right option/alt key to either act normally, as a meta key, or a Esc+ prefix. You want the latter option.
In Terminal open the preferences, select "Profiles", then click the "Keyboard" tab. At the bottom of the pane select the "Use Option as Meta Key".

Related

How to get keyboard shortcut `Cmd + S` to save on VS Code?

When I attempt to save my file on Visual Studio Code with the cmd+s keyboard shortcut, it does not save the code. I have to manually click File, the Save, just to be able to save my progress. I'm using macOS Catalina version 10.15.7 and VC Code version 1.55.2.
How do I fix this?
Attempts:
-Checked if ⌘ Cmd + S keyboard shortcut is tied to the Save functionality
If you do it right this solution will fix your issue.
I have never had a problem saving with VS-Code personally, but I have had issues with keybindings. IDK if you write your own keybindings, but if you do, you might want to check the keybindings that you have wrote to make sure they do not conflict with [CTRL + S]. The keybindings.json file that you create custom keybindings in, overrides the default keybindings.json file that defines the keybindings that VS-Code ships with.
To check your keybindings.json file...
Hit the F1-Key
A menu will drop open type in "Keyboard Shortcuts"
There will be two Preferences: Keyboard Shortcuts
Make sure to select Preferences: Keyboard Shortcuts and not Preferences: Default Keyboard Shortcuts
If the file is empty you are good. If you have keybindings written in the file, you need to iterate through them by hand, checking each one. Make sure that none use [CTRL + S] together. Even if the keybinding uses [CTRL + S] and other keys, you will need to disable it, so you can test if it is causing an issue.
Debugging [CTRL + S]
If your keybindings.json file is all good, then great, that's one thing to scratch off the list. The only thing left to do now is debug the Bound Key ("Key Binding"). To debug keybindings, you will use a built in tool, that VS-Code offers. To start do the following:
Hit the F1-Key
When the quick input drops open type the following into the text input:
"Toggle Keyboard Shortcuts Troubleshooting"
Select the option: Developer: Toggle Keyboard Shortcuts Troubleshooting
It should automatically open the OUTPUT panel, which is located in the same panel that your terminal is. Make sure that the OUTPUT is set to LOG(Window) in the drop down. (I took a picture and posted it below if you can't find the Keyboard Shortcut Troubleshooter).
The image might have funny declensions because I am on a dual monitor setup with 1 1080x1920 curved screen and one 1080x720 screen.... I cropped it to a STD HD 1920 width.
I Got My Trouble-shooter working, and Output open, now What Jay?
Okay... Well your at the right spot. Now every-time you press some keys, you should see your OUTPUT WINDOW working like crazy. It should be logging all sorts of stuff, which is good, very good.
This Part Is Important! READ CAREFULLY
What you want to do is use your keybinding that you feel isn't working appropriately. Use it when focus is set on an editor, use it when focus is set on a different editor, use it when focus is set on the sidebar. Where you are focused at in the editor at any given time can greatly affect a keybinding. The output is gonna write lines every-time you use your keybinding. Try not to hit any other keys while doing this, so you have a column in you output that includes logging from the keybinding you are testing only. Read the output see what it says. See if it looks right, or wrong. If it looks wrong, you can visit this link, to the VSCode site that covers this topic, and see if you can fix it your self. If you can't fix it your self, come back here, and edit your question. When you edit your question make sure that it includes the Troubleshooter's Logging Output.
VSCode Troubleshooting Keybindings (Keyboard Shortcuts) # https://code.visualstudio.com/docs/getstarted/keybindings#_troubleshooting-keybindings
Image that shows how to open the Keyboard Debugger
Also shows how to set the OUTPUT to Log(Window)
StackOverflow-2021-JUNE-26018:34-PST
Another thing to check for is, for lack of a better term, combination key bindings. For example, I was having an issue with ⌘+s. VSCode gave a message that it was waiting for the second key binding. After looking at the keybindings.json, I noticed I had a key binding for opening up user snippets as
{
"key": "cmd+s cmd+n",
"command": "workbench.action.openSnippets"
}
The ⌘+s portion of this key binding conflicted with the default ⌘+s

Using the §-key instead of the TAB key in ALT+TAB with Autohotkey

I have a need to use something else than the TAB key to achieve ALT+TAB functionality in Windows 10. (long story short - I'm using Parallells and remote desktop on a Mac, and need to keep the Remote Desktop setting "Apply Windows Key Combinations" set to "On this computer", so I can't just forward everything to the remote computer).
Using Autohotkey on the remote computer, I thought I could simply do something like
§::Send {Tab}
to be able to press ALT+§ instead of ALT+TAB, and have Parallells ignore it and just forward it as any other key (for example SHIFT+A to type an "A"). But it doesn't seem to work that way, nothing happens when holding down ALT and pressing § except a "pling" sound. Just pressing § alone prints a TAB character if I'm in a text editor.
I tried
^!§::Send ^!{Tab}
as well, same result.
For now I settled on using the following script instead, which lets me press § to bring up the ALT+TAB window, where I can either use arrow keys or the § key to select an application, and then Enter to switch to it:
§::Send ^!{Tab}
This is not bad, but it's annoying to have to use the Enter key to activate the window. So, is there any way to simply replace ALT+TAB with ALT+§ and get the normal functionality of the ALT+TAB window-switcher?
Use the hotkey <!§::AltTab.
<! means left alt and you can read more about AltTab here.
Also, AltTabMenuDismiss might be worth looking into related to the problem you outlined in the comments.

How can I change keyboard shortcut bindings in Visual Studio Code?

Using Visual Studio Code what is the procedure to:
Remap a built in command's keyboard shortcut. For example, say, Open File (default is Ctrl+O, it's unlikely that anyone would actually change this, but the same process should probably apply for any built in shortcut).
Remap an extension command's keyboard shortcut, say the Bookmark extension's toggle-bookmark (default Ctrl+Alt+K)
IN 2015, this involved editing configuration JSON files, but I don't know which one, or how. In 2021 there's a new UI, how do I find it?
Click File -> Preferences -> Keyboard shortcuts. Use the tab that opens up to edit and find available key bindings and assign them.
Historical Note: In very early versions of visual studio code, you would Click File -> Preferences -> Keyboard shortcuts and you would get JSON like this keybindings.json:
// Place your key bindings in this file to overwrite the defaults
[
{ "key": "ctrl+o", "command": "workbench.action.files.openFile" },
{ "key": "ctrl+alt+k", "command": "bookmarks.toggle",
"when": "editorTextFocus" }
]
But now in 2021 versions, there is a proper GUI, which is great because the json editing method was error prone and hard to discover.
The json editor feature has been moved to a new icon:
If you want to change the advance settings of keyboard shortcut such as when then you can follow these steps:
Update:(Thanks #phdoerfler for pointing it out that icon has changed)
File->Preferences->Keyboard Shortcuts
Click on icon on top right corner that says "Open Keyboard Shortcuts(JSON)" to open JSON version and place the keybinding.
You can find this in Documentation here.
The way to open the JSON file changed yet again in a recent version.
You need to click the middle of the three buttons in the tab bar.
You only need to do that if the change you need isn't possible on the normal settings screen.
On Windows:
go to File -> Preferences -> Keyboard shortcuts,
or press Ctrl+K, then Ctrl+S,
or edit %UserProfile%\AppData\Roaming\Code\User\keybindings.json file
On Mac:
go to Code -> Preferences -> Keyboard shortcuts,
or press Cmd+K, then Cmd+S
Keep in mind you can type things like shift ctrl c in the Search input in Keyboard Shortcuts panel to find commands by their keybindings.
Here you can find documentation which among other stuff contains also information about what When conditions you can use.
The latest version of Visual Studio Code 1.11.0 provides a rich and easy keyboard shortcuts editing experience using a new Keyboard Shortcuts editor. Read more here on their website.
I will not repeat others answers! And if like me! You get to install a mapping extension!
My prefered is Visual studio keys map
And the question would have been how you select it! How you change it ! Can we install multiples! And select between them!
First here some useful links about key binding and shortcuts
https://code.visualstudio.com/docs/getstarted/keybindings
https://code.visualstudio.com/docs/getstarted/tips-and-tricks
And before any, know that you can get to the keymaps extension by using the bottom left settings button for settings context menu! As in the picture bellow:
or through file>Preferences>keymap
Then you have to install one of the keymaps
The thing to know is that it will take place and make the changes right away!
What if you install another?
The new one take over! Or some mix! I couldn't tell!
And you may have problems!
How you change from one to another?
Remove the old ! remove the new one! And install it again! That's the way that i found it works! Disabling and reenabling didn't work!
And better always let only one installed at a time!
Unfortunitly as by Now 2020-05-08 no options to select between keys mapping exist!
Undo a keymap
Just remove! You may need to restart the editor!
Restart the editor
Also note that if you uninstalled all and reinstalled the one you want! And changes didn't take place! Close the editor and reopen it! That's help!
I hope that's help and may be save you some searching time!
And sure in the future we will have better handling! As vscode is just keeping getting more awesome and awesome! So an option to select and better handling will is expected to be added! And we will wait for it!
FYI on mac the keybindings.json file sits there:
/Users/your_user_name/Library/Application Support/Code/User/keybindings.json
ctrl + shift + p
Type open keyboard shortcut in the search bar
It opens keyboard Shortcuts. Here you can customize shortcuts.
(For extra info follow from 4th point)
There at the top right corner click on open keyboard shortcuts (JSON) (Refer to the image)
There you can modify the key, command, and when. That is also cool.
I tried
{
"key": "ctrl+a",
"command": "workbench.action.terminal.selectAll",
"when": "terminalFocus && !isMac"
}
by this now I can select all in vscode terminal
On Windows: Ctrl + K, then S
On Mac: ⌘ + K then ⌘ + S
This opens Keyboard Shortcuts Editor. It's searchable/filterable by either shortcut name or the key combination itself (example: type "ctrl" to see all bindings to the CTRL key.)
Image:
vscode search keyword shortcuts panel
Open Key Shortcuts from Preferences -> Keyboard Shortcuts
Search for the action in search field
Right click on one of the results and select "Show same keybindings"
Delete the conflicting key binding!

Custom Eclipse Shortcut doesn't work

I'm trying to attribute a custom shortcut key in Eclipse Kepler. It's for the Base from Working Copy in the Compare context menu any give file (via right click). This screenshot shows how it's been setup:
Pressing that key combination does absolutely nothing. ATM, other Compare sub menu commands are working fine (ie. CTRL+ALT+L). When I right click on a file > Compare, I can see the assigned shortcut in the context menu.
I've restarted Eclipse after assigning the shortcut to make sure it "takes" properly. Still to no avail.
It may be because of other commands also registered for the same short cut i.e Ctrl + Alt + L.
Please do verify how many commands are registered for the short cut Ctrl + Alt + L, by typing the "CTRL+ALT+L" text in the search box below the Scheme combo box.
If multiple command are registered then change the short of your command so that it become unique, then try the command and verify the result.

Ctrl Space Not Working in Eclipse Helios on Win 7

I have shifted by Dev Env recently to Eclipse Helios on Windows 7. After that the Ctrl + Space Content Assist feature is not working. I found out that that key option is utilized by Language Settings. I have tried disabling it. But it still doesn't work in Eclipse.
Any help is much appreciated.
Configure Eclipse’s content assist, go “Preferences>Java>Editor>Content Assist>Advanced“. Make sure “Other Java Proposals” is ticked.
http://www.mkyong.com/java/content-assist-ctrl-space-is-not-working-eclipse/
In my case nothing happens after pressing Ctrl+Space. Right now I have set a different short cut for the same and solved
Check your "Keys" preferences: maybe the Content Assist" shortcut has been overridden by another command which would also use Ctrl+Space.
That could happen with the installation of a new plugin, coming with its own set of commands and shortcuts: the bug 303894 for the XText plugin is a good example.
You probably have another application (in systray) that uses Ctrl+Space for something else. In my case I have a small utility which when I press Ctrl+Space makes the active window on top.
The solution for you would be to (1) exit that application which overrides the keys or (2) in Eclipse change Ctrl+Space to some other set of keys.
This was solution for me to get rid of windows key shortcuts:
Go to Start > Type in regedit and start it
Navigate to HKEY_CURRENT_USER/Control Panel/Input Method/Hot Keys
Select the key named: 00000070 for the Chinese (Traditional) IME -
Ime/NonIme Toggle hotkey 00000010 for the Chinese (Simplified) IME -
Ime/NonIme Toggle hotkey
In the right sub-window, there are three subkeys. Key Modifiers
designate Alt/Ctrl/Shift/etc and is set to Ctrl (02c00000). Virtual
Key designates the finishing key and is set to Space (20000000).
Change the first byte in Key Modifiers from 02 to 00
Change the first byte in Virtual Key from 20 to FF
Log off and log back on. I don't think it's necessary to restart.
Do not change the Hot keys for input languages in Control Panel,
unless you want to do this all over again.
https://superuser.com/questions/327479/ctrl-space-always-toggles-chinese-ime-windows-7
I have seen a similar problem in Eclipse Juno (version 4.2.0).
Since you have already tried Eclipse/Java code completion not working, I would check to see if there are any key conflicts. Go to Window -> Preference -> General -> Keys. In the filter box, replace the light gray "type filter text" with the word "Content"; the first item should be "Content Assist." Select it. It should have nothing in the Conflicts box in the lower right-hand portion of the screen.
If you have no conflicts, then it is likely that there is another program, outside of Eclipse, that is binding to Ctrl + Space.
I worked around this with an ugly solution. I copied the Content Assist. In the Binding field, I entered held down the Ctrl + Alt keys and pressed space. This restored the Content Assist function, but it required a brain remap when I am using one machine.
!Screenshot of Eclipse Juno, I had the same problem, then I changed it to different key combination, then it works.1
This is what solved my problem.
Goto Control Panel -> Clock, Language and Region -> Change keyboards or other input methods -> Change keyboards... -> Advanced Key Settings. For some reason I had ctrl + space set as Key sequence for language hot keys. I changed them to something else and rebooted.
Make sure to reboot because it did not work for me without the reboot.
On my Ubuntu, Xfce, ctrl space was allocated to switch language on the iBus preferences (if you have this running, you will see the 'i' icon on the task bar, right click and choose preferences). To change this, bring up the IBus Preferences, on the General tab, see the "Enable or disable:" option, click the ellipses and provide a different keyboard assignment.
This sorted me out without need to restart Eclipse.
I use eclipse indigo and had this problem. Creating a new workspace did not worked.
Go to Windows->preference->General->Keys->"Restore Default" - This fixed my issue
Note that I just had English(US) on windows 7 [Control Panel-> Clock,Language and Region ->Change keyboard or other input methods-> Keyboards and Languages->change Keyboards...->General ==>Default language is English and Installed Services I just had English(US) alone
After doing this some you might need to restart the system if it does not fix.
This is how I fixed my problem on Ubuntu 12.04 regardless of the eclipse version. My problem was that the ibus was overriding the shortcut so I deleted this shortcut configuration.
Type ibus in the dash:
Then select Keyboard Input Methods. From there click on the first three dots next to the Enable or disable textfield. This windows should appear:
If there is something bound to Ctrl + Space simply delete it.
#Polac - Thx. That's what fixed it for me. I'd hit ctrl+space and I'd get a popup for chinese character selection. I have Windows 7 so for me it was:
Control Panel -> Region and Language -> Keyboards and Languages tab -> Change keyboards... button -> Advanced Key Settings tab
Be warned, its stubborn. I tried to just clear them, but as soon as I applied the settings they reset back to using the original key bindings. If I change the key binding to something obscure they still reset sometimes. It's annoying. Maybe its just my OS installation that's goofed, but it could be a Microsoft bug.
Didn't need Chinese on my system, so I removed it as an installed language in the first tab and that finally got rid of the hardcoded Chinese key bindings.
In Eclipse you can use the Alt-/ character sequense instead of Control-Space. This is an old problem which Eclipse and Chinese keyboards, which they addressed by adding this short cut.
I found the answer.
Windows / UV Elements - was OFF! I don't know how but they were off. And when you click Ctrl+Space he working, but your all elements are off and you think that it is not working. You must on all UV elements and after your Ctrl + Space will be work.