Mac: Disable Keyboard-Shortcut for symbol - macos

On my mac, typing Option-Shift-R in any text field in any program inserts a "‰" character. The problem is that I use Option-Shift-R as a special shortcut in another program (PyCharm), and whenever I use this key it both executes the action in pycharm and types the character, which is annoying.
Given that I've never once needed the "per-mille" symbol in my life, is there a way on mac to disable this shortcut? There seems to be no option for it in the "Keyboard -> Shortcuts" menu.

It is your keyboard layout that's producing "‰" when you press Option-Shift-R. (It's also what produces "A" when you press the A key, and everything else.)
You can try switching to a different built-in keyboard layout using System Preferences > Keyboard > Input Sources, but you probably won't find one which produces nothing when you press Option-Shift-R.
So, your best bet is probably to create a custom keyboard layout and use that. There's an app called Ukelele that can help create such custom keyboard layouts. I haven't check recently, but I'm fairly sure it can create a new one by copying one of the built-in layouts, which you then tweak just a bit so most things work just as you expect.

Related

Visual Studio Code shortcut to display autocomplete list before typing on macOS

I am trying to display all possible words after putting the cursor in certain place in the code.
The autocomplete list appears when I start writing/typing:
However, I would like to see all suggested words even before typing.
I tried command + space, however it was a system shortcut for Search in macOS:
Any thoughts?
In case you are a CJK user using Mac, Ctrl+Space will not work, since it is used to switch IMEs.
There is another keyboard shortcut for triggering suggestions:
Option+Esc (Mac)
Alt+Esc (Windows)
Also see this post.
VS code version: 1.41.1
I solved this problem using fn+control+space.
Hope it helps you.
"change input source" keyboard shortcut should be disabled
To disable it->
Go to system preferences -> keyboard -> input sources
add a new input source (choose ABC)
Go to shortcuts tab (inside of keyboard settings)
Click on input sources on the left
disable the "select previous input source" shortcut
restart your vs code and now ctrl+space will show quick suggestions.
You can use the following alternative keyboard shortcuts:
⌘+I (mentioned in the official VS Code documentation for "Trigger suggestion")
⌥+esc
fn+control+space
The shortcut for the "Trigger Suggest" command is ⌃Space (ctrl+space) — as mentioned in the comments.
Most default shortcuts can be found in the documentation, which will automatically show the correct keybindings for the system you're on. In other words, if you visit the page on a Mac, you'll see Mac keybindings.
Additionally, you can:
go to Code > Preferences > Keyboard Shortcuts (on a Mac) and search for keybindings based on the command you want to execute
open up "show all commands" (⇧⌘P on a Mac) and search for the command there, allowing you to either view the keybinding for that command, or simply navigate to it directly from the search
Of course you'd have to have some idea of what the command's name might be. And in this case, a search for "suggest" would suffice.
If you use too many keyboard layouts, maybe the MacOS shortcut might be active. You can disabled ^(Ctrl)+Space shortcuts for MacOS.
System Preferences>Keyboard>Shorcuts>Input Sources> Disable Select the previous input source.
You can use next shortcut for change input sources.Ctrl+Alt+Space
when I was set up 2 keyboards with different layouts, and it turn out it overrides the ^+Space behavior, so this is how fix it:
Go to system preferences -> Keyboard -> Keyboard shortcuts
Click on input sources
and disable the "select previous input source" shortcut

Custom key for multiple cursor in VSCode

In VS Code you need to use alt to set multiple cursors. Is there any way to change it to, maybe, ctrl? Using alt really annoys me as it's less comfortable to me and it always toggles menu bar which I hid on Windows:
photo
Or maybe is there any other solution, maybe to change key that toggles menu? I couldn't find any useful shortcut entries in shortcuts config of vs code.
It is not currently possible to customize mouse shortcuts, the feature request for that is here https://github.com/Microsoft/vscode/issues/3130
It's actually completely unusable on most Linux distributions as it's an OS-level shortcut.

RStudio for Mac: "Move Focus to Source" shortcut doesn't work (?)

The "Move Focus to Source" Shortcut (Ctrl1) doesn't seem to be working--either it does nothing or, when RStudio is in full-screen mode, it (annoyingly) acts as if I had just pressed Ctrl+Left Arrow) (However, manually clicking on "Move Focus to Source" does work as expected).
This post suggests that it might be a bug. However, in contrast to the post, the other shortcuts involving control+numeral (Such as "Show History") appear to be working correctly.
So is this a bug or am I doing something wrong?
Also, since--as mentioned in the post--the RStudio guys "don't recommend overriding [the keyboard shortcuts] via the Mac System Preferences", I'd prefer to avoid that approach (though I'm not exactly sure why it should be avoided--hopefully someone can shed some light on this, too).
Set-up:
OS X Version 10.9.3
RStudio Version 0.98.501
By default, Apple sets the Ctrl1 shortcut to "Switch to Desktop 1". As a result, if you want to enable the Ctrl1 behavior in RStudio you will first have to disable this shortcut in the System Preferences.
Specifically, the path is:
System Preferences --> Keyboard --> Mission Control --> Switch to Desktop 1
Then, after disabling this, RStudio's shortcut will work just fine.
[Note: you could either reassign the RStudio shortcut or the "Switch to Desktop 1" shortcut but the approach I described is definitely the most reliable since you won't have to worry about any other shortcut conflicts.]
I encounter the same problem when I use the Romaji keyboard instead of the e.g. US or US Extended keyboards.
When one of the Japanese input methods is active, ^1 is used to "Convert to related character" and ^2 is used to find a similar kanji character.
In other words, when you use multiple input methods, use the correct input method for working with RStudio.

How to bind numeric keypad keys in TextMate?

I often use TextMate on a desktop Mac with a full (old-style) Macintosh keyboard with a full numeric keypad. I'd like to be able to bind menu item keys, macro key triggers and other actions to some of those numeric keypad keys.
I understand I can do this for some Cocoa (?) text editing commands in a ~/Library/KeyBindings/DefaultKeyBinding.dict file, but for Macros the TextMate dialog box doesn't distinguish between numeric keypad and main keypad keys with the same name. Ditto for the OS/X keyboard shortcuts preference pane used to change TextMate menu item keys.
Should I be trying to customize some of the core bundles instead?
Any advice much appreciated,
Stu
I understand I can do this for some Cocoa (?) text editing commands in a ~/Library/KeyBindings/DefaultKeyBinding.dict file
This is the key. TextMate does use this file, but in addition it has its own version that may be used to override settings or provide unique actions. You can even call some TextMate functions (selectors) directly through this method.
I recommend copying the default version from /Applications/TextMate.app/Contents/Resources/KeyBindings.dict to ~/Library/Application Support/TextMate/KeyBindings.dict and modifying it there.
Unfortunately, calling Bundle macros is a challenge... but I think it may be possible through some clever combinations of commands...
("insertText:"," keypad1.sh","selectWord:","executeCommand:")
Then, if you add into your source bundle the default values of the commands (in Support/bin) --- keypad1.sh returns 1... --- you can have customized commands in the Bundles you're interested in modifying.
I haven't tried this, but I think it may just work...

2 basic Textmate shortcuts 'don't save' and 'replace all'

Ok, maybe they're system shortcuts. I've googled (just a bit) and couldn't find an answer. Maybe there isn't any :) Still..
I love keyboard and I use quite a few in TextMate but just realise I still use the mouse for 2 of the most common actions:
How do I press search and replace after the S/R dialog box is up? - if you press enter it just takes you to the next occurrence of the search string
when I close a file that I don't want to save, how can I choose don't save without touching the mouse?
To select Don't Save from the keyboard, you can use the keyboard shortcut ⌘+D. (This works in most OS X apps, not just TextMate.)
The search and replace (actually it's called "Replace & Find") shortcut is alt-cmd-f and works both inside the Find dialog and without it. With using other shortcuts like cmd-f, shift-cmd-f, cmd-G you can perform most of the search/replace actions without even opening the dialog. For example, if you want to perform the substitution, you press alt-cmd-f, then another is highlighted and if you want to skip it, it's cmd-G, which finds yet another, and so on.
As for the second question, I think it's a general Mac OS X issue -- the message boxes buttons don't have keyboard shortcuts in other apps, too. When I first switched from Windows, this annoyed me but I got used to it by now.
I recently built a web site to store lists of shortcut keys and there is a great list of TextMate Shortcut Keys for Mac on there.
If you know any more you can add them yourself too!
Here's the link http://shortcutkeys.org/software-shortcuts/mac/textmate
If you want to choose the answer for any dialog with the keyboard, go to "System Preferences" > "Keyboard" > "Keyboard Shortcuts". On the bottom of that page there are two radio buttons. Activate "All controls". Now you can switch options of a dialog box with the tab key in every proper OS X application. Note that this is a secondary option, thus you can hit the enter key for the default behaviour or space to trigger your secondary option. Most often it's set to the opposite of the default behaviour, i.e. "Don't save" in a file save dialog and "no" or "cancel" in many many other applications.
I think thats a great feature. Due to the secondary option I always hit either enter or space, depending which option I wanted.

Resources