How to really disable ctrl+shift+arrow keys in Windows Terminal Preview? - windows-terminal

Everytime I try to use ctrl-shift-up or ctrl-shift-down inside of the new windows terminal preview, it scrolls the terminal view up or down. I tried going into the profiles.json file and set the "command" : "scrollDown" and "command" : "scrollUp" to "unbound" but it has no effect.
If I try to bind scollUp to something else, let's say ctrl+alt+b, then it correctly adds the keybind to the command. It seems like there's a default windows keybinding that is set to scroll the terminal view up and down using ctrl+shift+arrows.

Not sure if you found the answer, but I was looking for this too. Found the below in a microsfot devblog that works currently:
If there is a default key binding included in the defaults.json file
that you would like to free up, you can set that key binding to null
in your profiles.json.
{
"command": null, "keys": ["ctrl+shift+w"]
}
Link to full article:
https://devblogs.microsoft.com/commandline/windows-terminal-preview-1910-release/

you can add
{ "command": { "action": "sendInput", "input": "\u0000" }, "keys": "ctrl+shift+up" },
{ "command": { "action": "sendInput", "input": "\u0000" }, "keys": "ctrl+shift+down" },
so when you press the keys, it replaces the undesirable command with sending a null character to the input (that, of course, does nothing lol)

Related

How to access Cypress data in the console

Below is a screen shot of Cypress 6.8 runner. I am interested in accessing the data printed in the console shown on the right.
In order to see this information within the browser window where tests are executed, you would open the developer tools and click a row. In the example, I had clicked row 8 which is shown by the purple pin and tooltip stating that "Printed output to your console".
Is it possible to programmatically access to this same information printed in the console? For example, could I get access to the command, applied to and any other information that might be logged. My understanding is this information only appears when clicking the row.
I would like to access this information using a custom plugin. Can you please provide insight into how this might be possible? I've been experimenting with the plugins/index.js module exports which provides access to on. But, at this time I don't have any meaningful code to share. I'm in the learning stage trying to determine if its feasible to access this information. Thanks.
At the top of your spec or in cypress/support/index.js you can add an event listener which listens for log:added, ref Catalog of Events.
Cypress.on('log:added', (logObject) => console.log(logObject))
This provides your callback a stream of the "log attributes" objects in the first parameter, which have a console.props property, which is what is printed when you click a line in the LHS Cypress log.
{
"message": "http://example.com/",
"timeout": 60000,
"name": "visit",
"type": "parent",
"event": false,
"id": 3,
"state": "passed",
"instrument": "command",
"url": "http://example.com/",
"hookId": "r2",
"testId": "r2",
"testCurrentRetry": 0,
"viewportWidth": 1000,
"viewportHeight": 660,
"wallClockStartedAt": "2021-03-20T03:12:21.490Z",
"chainerId": "chainer4",
"consoleProps": {
"Command": "visit",
"Resolved Url": "http://example.com/",
"Redirects": [],
"Cookies Set": []
},
"renderProps": {},
"totalTime": 218,
"snapshots": [
{
"htmlAttrs": {},
"body": {}
}
],
"ended": true
}

sublime text key bindings : is there any way to navigate 'back' and 'forward'

in eclipse or vs or si, I can type alt+← to navigate to last view(back) or alt+→ to next view(forward), is there any keyboard shortcut or plugin to do this in sublime text.
i tried searching in package control and nothing seems related
You can define that behavior in the user key bindings.
Preferences -> Key Bindings - User
And then define there the combination of keys that you want. E.g. In this case, those commands would be Ctrl+4 and Ctrl+6
[
{ "keys": ["ctrl+6"], "command": "next_view" },
{ "keys": ["ctrl+4"], "command": "prev_view" }
]
This is an old question, but I wished to do the same. I found that such navigation can be configured in Sublime Text 3 via user key bindings:
Preferences -> Key Bindings - User
Include these { braced lines } in the [ array ]:
[
{ "keys": ["alt+left"], "command": "jump_back" },
{ "keys": ["alt+right"], "command": "jump_forward" }
]
(For earlier versions of Sublime, there's an extension https://github.com/timjrobinson/SublimeNavigationHistory)

Sublime text 2, setting key bindings for uploading files with SFTP

just switched to sublime and have installed the SFTP package.
What i want is to be able to do is: shift + command + U and then that will uploaded the file i am viewing.
I have looked in the key bindings file and saw this:
{ "keys": ["super+ctrl+u","super+ctrl+f"], "command": "sftp_upload_file" },
{ "keys": ["super+ctrl+u","super+ctrl+r"], "command": "sftp_upload_folder" },
{ "keys": ["super+ctrl+u","super+ctrl+y"], "command": "sftp_sync_up" },
{ "keys": ["super+ctrl+u","super+ctrl+n"], "command": "sftp_upload_open_files" },
{ "keys": ["super+ctrl+u","super+ctrl+m"], "command": "sftp_monitor_file" },
But that makes no sense to me.
They all start with the same "super+ctrl+u" I cant seem to find any information about this.
Thanks!
Each of those keybindings are two multi-key presses.
I.E. Press super+ctrl+u at the same time, then release, then press super+ctrl+f at the same time.
Or, if you don't like those, remap the commands to different keybindings.

Mark current Line, and navigate through marked lines

In Visual Studio, we can use:
CTRL+kk to place a marker on the current line
and
CTRL+kn to navigate through marked lines.
My question is: is there a way to do this with Sublime Text2?
Thanks
Yep! Go on the menus to Preferences>Key Bindings - Default this is a file with all the default key bindings. Read the whole thing! (lots of goodies) Here is a cut and paste of the bookmarks info (linux), which should be self explanatory.
{ "keys": ["f2"], "command": "next_bookmark" },
{ "keys": ["shift+f2"], "command": "prev_bookmark" },
{ "keys": ["ctrl+f2"], "command": "toggle_bookmark" },
{ "keys": ["ctrl+shift+f2"], "command": "clear_bookmarks" },
{ "keys": ["alt+f2"], "command": "select_all_bookmarks" },
Actually, you can. Here's the menu screenshot from a mac. I hope this helps.
The bookmarks system is pretty OK, but I would suggest you to try the plug-in "SublimeBookmarks" which extends the capabilities of the built-in mechanism.
Check it out here:
https://github.com/bollu/sublimeBookmark
Preview:
http://i.imgur.com/gtjChPG.gif

Keyboard Column Selection for Sublime Text 2 on Windows

I've been trying to get column selection via keyboard bindings working on Windows.
The Default (Windows).sublimekeymap says this:
{ "keys": ["ctrl+alt+up"], "command": "select_lines", "args": {"forward": false} },
{ "keys": ["ctrl+alt+down"], "command": "select_lines", "args": {"forward": true} },
And it is also documented here: http://www.sublimetext.com/docs/2/column_selection.html However, every time I try to do column selection via the keyboard it doesn't work. Is this an environment specific problem or an actual bug? Or perhaps I'm doing something wrong.
Assuming you are getting multiple cursors when you go up in a block of text with Ctrl+Alt+Up, you then need to use Shift+Left and Shift+Right to make the column selection.
If you are not getting multiple cursors at all, try changing the keybindings just to up and down, see if that works. It may be that your windows environment is using Ctrl+Alt+Up` for something else and prevents its use in Sublime.
Not the right spot for this exactly, but if you RDP into a VM, the defaults won't work either.
I've redefined the line reordering binding of Ctrl+Shift for this purpose
{ "keys": ["ctrl+shift+up"], "command": "select_lines", "args": {"forward": false} },
{ "keys": ["ctrl+shift+down"], "command": "select_lines", "args": {"forward": true} }
I think that is really late but, I found the following the most effective solution.
Put this in your "Key bindings defaults" and save it
{ "keys": ["alt+shift+up"], "command": "select_lines", "args": {"forward": false} },
{ "keys": ["alt+shift+down"], "command": "select_lines", "args": {"forward": true} },
After, you can use the following to make a column selection
Alt + Shift + [Down | Up]
I had the same problem because of Winamp Global Hotkeys. Just remove that key combination from Winamp Preferences and it will work.

Resources