How can I fix this?? VS Code inserts keycode when moving lines with numeric keypad arrows - visual-studio-code

VS Code 1.75.1
When moving lines with ALT-UP/DOWN using the dedicated arrow keys, VS Code works as expected.
I have my numeric keypad locked to use the control function rather than as a numeric keypad.
When I move a like with ALT-UP/DOWN using the arrows on the numeric keypad, VS Code moves the line then inserts a character after I release the ALT key. If anything is selected, VS Code does the move then replaces the selected text with a character. I'm guessing the character is derived from the keycode of whatever arrow keys on the numeric keypad I pressed.
How can I have VS Code just do the move and not insert characters?

This is not VSCode problem, this is keyboard behavior, you can test it in any input field.
Seems the best way is to use some soft (like Autohotkey) to map numpad arrows to main arrows.

Related

Re-enable right-Ctrl when using Canadian Multilingual Standard keyboard for my AutoHotkey function?

I have an Autohotkey function that lets me switch between tabs with "Control + left/right" as well as closing tabs (Ctrl-down) and going into the search bar (Ctrl-up). It helps me save clicks and use the mouse less.
However, I use the Canadian Multilingual Standard keyboard to type accents (éèçà) in French for some of my classes and this keyboard DISABLES the right control key (the one right beside my keyboard buttons) which is the most convenient to use with my right hand only.
Here is a source documenting this: http://archives.miloush.net/michkap/archive/2013/04/08/10409187.html
Is there any way I can override this? I very rarely use the letter œ for because I can just use ALT + 0156 instead.
Here is the very simple code for my hotkey!
^Left::SendInput, ^{PGUP}
^Right::SendInput, ^{PGDN}
^Up::SendInput, !d
^Down::SendInput, ^w
Using SciTE4AutoHotkey tool, on my UK hardware keyboard right ctrl is detected as expected (RControl)
When I switch to French (Canada) Canadian Multilingual keyboard,
the right ctrl key is not found, also Virtual Key is different: DF
(SC means scan code and VK means virtual key)
so if you remap, it should solve the problem
~SC11D::RControl
After remapping: not found is replaced by RControl with each keypress.
Even if above remapping does not work for your case, it is a matter of finding which key corresponds to relevant scan code and then you can remap it.
Double click on your ahk script on the taskbar, and then
View > Key history and script info (Ctrl + K) by pressing key and refresh(F5) you can see respective keyboard scan codes.

Select text from keyboard in matlab

In emacs, it's possible to set a mark with c-space. The mark marks one end of a selection then when you move the cursor the other end of the selection moves with it.
For example, c-a, c-space, c-n, c-n selects two lines of text.
Matlab doesn't seem to have the concept of placing a mark. Is there any way to select text from the keyboard?
I'd like to do things like whack/yank a few words or comment out multiple lines without using the mouse.
I found this old question while trying to figure out the same problem. If anyone out there is still looking for how to do this, Matlab (as of version 2016a) supports keyboard selection shortcuts in the keyboard binding preferences (Preferences --> Keyboard --> Shortcuts). By default the text select functions are using the Home/End and Ctr/Shift + arrow keys to do this. I don't think the Emacs marking concept works but you could define a shortcut to your liking.
Matlab Emacs Keyboard Binding Defaults
At least you don't have to use the mouse :-)

How can I remove the Numpad Slash keyboard shortcut from MS Word 2013 Outline View

I work a lot in Microsoft Word's Outline view, because I like being able to expand/collapse subtrees of a tree of bulleted lists, and quickly move bullets around with Ctrl-Alt-arrow keys.
I'm generally impressed with the customisability of MS Office's keyboard shortcuts. However, there are some keyboard shortcuts that apply to Outlining mode that don't appear to be modifiable in the usual way. In particular, the Numeric Keypad Slash key ( / ) is bound to the rather useless function "toggle formatting", which hides colouration of my text. MS ref, specific ref
I'd like to be able to enter numeric sequences on the numeric keypad that include slashes. In other words, I'd like to be able to remove this keybinding which is no use to me, and instead bind Numeric Keypad Slash to just enter a literal slash character.
But I can't find a way to do this. The normal Customise Keyboard Shortcuts view doesn't help: I can assign new keyboard shortcuts to the OutlineShowFormat effect, but it doesn't list Numeric Keypad Slash as an already-existing keyboard shortcut so I can't remove it.
Is there any way to remove this keyboard shortcut, or override it so that pressing the slash key on my keypad will just enter a slash?
Well, in the absence of any other answers (this question earned me the Tumbleweed badge!), I found a workaround: Hold Shift while typing Numpad Slash to get a literal slash in Outline View rather than toggling formatting. Not great, but it will probably be easier than moving my hand over to the main keyboard slash key.

cannot select text in VTE using keyboard

I'm writing my own terminal application in C using the VTE library. Everything works great except I cannot select text with the keyboard. For example if I have just typed something, in most terminals you can hold down the shift key and select the previous text with the left arrow key, then you can paste it wherever you want. In VTE, all that happens is you get a D in the current cursor position. I can obviously block the printing of D in the terminal by returning TRUE from the keypress (which I have done), but I still cannot select the text.
I thought I might be able to do it manually starting with vte_terminal_get_cursor_position(), but there is no method to select a block of text (that I could find) in VTE once I have the boundaries for the selection.
I've looked at other VTE based projects such as tinyterm, and evilvte, but they just print the D in the terminal as well when that key combination is pressed.
So is there any way to select text in VTE using the keyboard? Thanks.
Correction:
It turns out that very few if any terminals allow you to select text with the keyboard. Not sure how that got into my head. Anyway, I still think it would be a handy capability, so the question stands. Any ideas would be greatly appreciated.

Eclipse: Text Editing Without Mouse

I have bandage due to 5th metacarpal damage. Typing is no issue at all, I do hours of it and it's fine. Using a mouse... impossible. This is not about being a productivity ninja not losing the time it takes to reach for the trackpad or the mouse... it's actual being able to do some stuff or not at all for the moment. Anyway, here's the question, put simply and clearly:
In an Eclipse editor, can I move around using the keyboard only?
Examples of actual things I would like to be able to do without using a mouse:
Move the cursor to the end of the line
Move the cursor to the beginning of the line
Move the cursor one line down
Move the cursor one line up
Move the cursor one column left
Move the cursor one column right
Move the cursor one word left
Move the cursor one work right
Move the cursor to the end of the word
Move the cursor to the beginning of the word
Delete the character to the left of the cursor
Delete the character to the right of the cursor
etc.
I realise some of this is possible already using a mixture of END, HOME, CTRL/ALT + ARROW_KEY, etc. But it's not as comprehensive as, say, E-Macs or Vim.
As simple as that.
In Vim, I use j,k,h,l... in Xcode I use Emacs bindings (CTRL-N, CTRL-P, CTRL-H)... how can I use Eclipse in a similar way? I have heard of a "vim" plug-in but I really just need the cursor movement, that's it. Nothing else.
Should I just create custom shortcuts for each movement?!
Going to the end of the line: End key
Going to the start of the line: Home key
Going one line down: down arrow key
Move the cursor one line up: up arrow key
Move the cursor one column left: don't know what you mean by column
Move the cursor one column right: idem
Move the cursor one word left: ctrl - left arrow key
Move the cursor one word right: ctrl - right arrow key
Move the cursor to the end of the word: no idea
Move the cursor to the beginning of the word: ctrl - left arrow key
Delete the character to the left of the cursor: backspace
Delete the character to the right of the cursor: delete
This is on Windows. All the shortcuts are available in Window (Alt W) - Preferences (P) - General - Keys (type "Keys" in the filter text box). Most of the shortcuts above are standard shortcuts, which are used in every windows editor.
I found it :(
Preferences > General > Keys > Emacs
You can do almost everything with your keyboard:
Take a look here for a detailed list of shortcuts:
http://www.shortcutworld.com/en/win/Eclipse.html