Netbeans keyboard shortcuts that do not work with a non-English keyboard layout - netbeans

I believe this problem has been present for a few years in Netbeans, in different non-English keyboard layouts (see for example Shortcuts in NetBeans don't work).
Premises:
I am using Netbeans 7.3.1, and coding in Java
I use a non-US keyboard layout (Swedish), and Netbeans picks up all the Swedish keys correctly when typing them in the code window.
The problem:
The keyboard shortcuts that use keys that are mapped the same in Swedish and English layout (normal letters for example) work fine, but the keyboard shortcuts that use keys that are mapped differently behave inconsistently.
Example:
Toggle comment (Ctrl+Slash). Slash is Shift+7 in Swedish layout, Ctrl+Shift+7 brings up project properties. Slash in US layout is the key left of right shift, labeled - in Swedish layout. If I press that, Netbeans recognizes this as - and performs the standard behavior for Ctrl+- (a code fold).
Complete line (Ctrl+Shift+;). The key labeled ; in Swedish layout has < in US. This combo brings upp the bookmarks tab. The key labeled ; in US layout has a Swedish letter, this combo does nothing.
I have seen questions by people in different languages asking about one specific shortcut or another not working, and the answer is usually to edit the Netbeans keymap, I wanted to connect a few more dots. Does anybody have further experience or suggestions?

Another shortcut appearing on the keyboard shortcuts card for for 7.3.1 that this affects is Move caret to matching brace (Ctrl+[).
These issues have been around since at least 2008: https://netbeans.org/bugzilla/show_bug.cgi?id=155117. As of last year, the developers seem undecided if it is worthwhile to fix: https://netbeans.org/bugzilla/show_bug.cgi?id=227247
However -
Toggle comment has an alternative shortcut - Ctrl+Shift+C - originally aimed at German keyboards, but which should work for all remotely mainstream layouts since it uses no special key.
Move caret to matching brace apparently has the alternative Ctrl+^ aimed at French layout, but does not work in Swedish for example.
Complete line has no alternative I could find.
Conclusion
Personally I will be using Ctrl+Shift+C for comments, and entering my own alternative for Complete line in Options > Keymap. Move caret to matching brace / bracket, though named on the shortcuts card, does not show up as a reassignable here as far as I can see.

I had this problem too and it had a simple solution and the solution was the font change.
In Netbeans (tool-option-font&زcolor-font). I changed my default font.

Related

Give keyboard shortcuts priorities to my keyboard layout over Word 2010

I want a trilingual English-French-German keyboard with the Dvorak layout on Windows 7. I made it myself with the Microsoft Keyboard Layout Creator v. 1.4. For some letters I have to assign five variants (e, é, è, ê, ë plus the capital versions). Microsoft Keyboard Layout Creator only allows Ctrl-[key] and Alt-Ctrl-[key] to make alternate characters (not Alt-[key], unfortunately). I had no choice but to use the Ctrl-[key] sequence to produce a lot of keys.
In almost every program (e.g. Firefox) the keyboard has priority over program-defined shortcuts, so that if Ctrl-u is a defined key on my keyboard, the Firefox shortcut with Ctrl-u is frozen. This is what I want in Microsoft Word 2010. But even if I delete the Word 2010 shortcuts in File > Options > Customize Ribbon > Keyboard Shortcuts Customize, Word still has control over the Ctrl-[key] sequence. That is, if I kill the Ctrl-f (find) shortcut in Word, and then press Ctrl-f, nothing will happen: find will not open and my Keyboard assigned Ctrl-f character is not printed.
How can I give priority to my custom-defined characters over Word's Ctrl shortcuts?
Your best bet is probably going to be using AutoHotKey to do your layout mappings. AHK basically monitors the keyboard buffer at the OS level, so it is able to intercept and correct keystrokes before the other programs can react to them. I can confirm that Ctrl+F in AHK does overwrite the keyboard shortcuts in Word 2010.
Some sample AHK code:
^f::Send {U+00C6} ;Ctrl+F sends Æ
!f::Send {U+00C7} ;Alt+F sends Ç
!^f::Send {U+00E8} ;Ctrl+Alt+F sends è
!^+f::Send {U+00C8} ;Ctrl+Alt+Shift+F sends È
^ intercepts a Ctrl keystroke, ! intercepts Alt, and + intercepts Shift, and they can be combined. The {U+xxxx} corresponds to the Unicode number for the given character.
Using this method allows you to keep your keyboard mapping in a simple txt file (easy to backup or transfer to another computer). It also overrides shortcuts in all programs, so you won't have to re-adjust the shortcuts for each new program you use.

Eclipse Editor consumes AltGr+A even after disabling keyboard shortcut

I use Eclipse and a non-QWERTY keyboard. My # sign is typed through Alt GR+A. This is on Windows 7.
The Eclipse Editor won't let me type an # which is bad.
I disabled the key shortcut Alt+A, it still doesn't work.
# works in other programs and in other windows inside Eclipse (e.G. find, options etc.) but not in Editor.
As this also applies to Alt GR+P (which is my } ) a general solution as to how to figure out what key events get consumed would be nice.
The Eclipse editors use the StyledText widget. This ignores some inputs depending on the platform.
On Windows the widget ignores anything with just Alt or Ctrl or Alt+Shift or Ctrl+Shift. The code claims that Alt Gr should look like Ctrl+Alt and would get through.
On Macs Cmd and Cmd+Shift is ignored.
On Linux / Motif Ctrl and Ctrl+Shift is ignored.
There is a very old Eclipse bug 20953 which sounds like this problem, but it supposed to have been fixed long ago by the code I mentioned.

Can macros in Notepad++ have "simple" keyboard shortcuts

I've recorded and saved two macros in Notepad++, giving them Ctrl+B and Ctrl+Shift+B shortcuts respectively. First doesn't work (does not playback macro), while second is all fine (restart doesn't help).
Can macros in Notepad++ have "simple" keyboard shortcuts, like Ctrl+B?
BTW: I'm trying to "emulate" formatting shortcuts (like bold, italics etc.), but for Markdown, not for HTML. That's why Notepad++'s plugins like "WebEdit" won't help me here.
Reworded:
You can save a macro with CTRL+B shortcut...
but you can't use the shortcut to same combination to call it back.
It think it's because it seems that key stroke is already used and your own combination is not overridding the original reserved one.
Ctrl-B Go to matching brace
It seems like a bug within notepad++ or not well documented feature.
Following mehow's answer I found the solution. Ctrl+B shortcut doesn't work for my macro, because it is used with another command.
Going (in Notepad++) to Settings > Shortcut mapper > Main menu, locating Go to matching brace command and setting its shortcut to None solved the problem. From this moment, each press of Ctrl+B calls my macro, not that previous command.

Move Eclipse's Find/Replace dialog to a view?

I find Eclipse's (Eclipse 3.7, Indigo, running under Mac OS X 10.6.8) Find/Replace floating dialog box to be very annoying. Part of the time it ends up obscuring the search results. Is there any way to have Eclipse move the Find/Replace somewhere else? I'd like it to be a pop-up view, as I often do with the Console, Servers, Outline, and other views. However, if it could be incorporated into the view which it's searching, that would be great, too.
Eclipse's Find / Replace dialog is a dialog, not a view, so you can't drag and drop it to one of the view areas.
Here's a Eclipse search plugin that might work for you. Scroll all the way to the bottom of the page to get the Software Update link.
Worst case, you could write your own Eclipse plug-in that creates a view that does a Find / Replace.
TL;DR
Find/replace cannot be used as a view. Here are two ways to find text without obstructing the search:
Use incremental search (CTRL+J)
Use the quick search plugin (CTRL+SHIFT+L)
Pros and cons
Both approaches behave differently from the traditional find/replace and may require some getting used to.
Approach 1.
It works out of the box, no need to install a plugin, but it (currently) does not support pasting nor searching for the current selection (but there is CTRL+K for the latter). You can use UP and DOWN or repeat CTRL+J or CTRL+SHIFT+J to jump between matches.
Approach 2.
This still opens a dialog, but one which integrates the search results rather than obscuring them. I suggest resizing it to have a good preview size.
The default shortcut shadows the "Show Key Assist" original, but this can be changed. It is an extra install and AFAIK only supports case sensitive searches, but it supports searching for the selection and pasting.
It shows matches across files, starting with the top open editor (if you have more than one visible, e.g. side by side, it sometimes does not start with the one you were last on). You can move between matches with UP and DOWN and hit enter to go back to the editor on the selected match.
NOTE
I suppose on OSX you can replace CTRL with CMD in keyboard shortcuts above to achieve the same, but I could not test it. The shortcuts can be customized in Preferences->General->Keys

Ctrl+Backspace/Option+Delete fails to delete previous word in MATLAB IDE

I've noticed that Ctrl+Backspace/Option+Delete doesn't delete the word to the left of cursor in the MATLAB editor, as it does in many (most?) other editors and programs. This is intensely annoying, as I often will want to change a function name or small section of code. Currently I am forced to hold shift, use option+left, and then press delete to perform what should be a two keystroke operation.
Is there a way to enable it, or is a similar shortcut available? I found this unanswered question on MATLAB Central, but no further joy.
Edit:
Running R2010a on OSX
Are you on R2010b?
At least on Windows, this is supported starting in R2010b. All the keyboard shortcuts are in File > Preferences, under Keyboard > Shortcuts. Type "word" in the search bar (the text field just above the list of actions) to see the word-level actions. In R2010b, but not earlier versions, there is a "Remove Previous Word" action, and in Windows it's bound by default to Ctrl+Backspace. Sounds like you're using Mac, too; I don't know what the default binding is there.
So, upgrade to R2010b, and maybe adjust the bindings under Keyboard > Shortcuts in Preferences.
This and some other keyboard shortcuts work in the editor but not in the command window. I don't know why. You might want to request that as an enhancement from MathWorks if you want it in the command window, too.