Code Monkey home page Code Monkey logo

Comments (3)

xobs avatar xobs commented on July 24, 2024 1

Yes, that does seem to solve this issue.

from tomu-quickstart.

evyatartamir avatar evyatartamir commented on July 24, 2024

@kastriotfetahaj You can send a Modifier Key, for example the Left Gui key, and "r" in the same report. See here for the report format.

To inject the "Enter" key, I modified the injkeys() function to convert ASCII CR ('\r' == 0xD) to its USB HID scancode (40 decimal):

else if(source[j]=='\r') // CR (Enter)
	buf[2]=40;

I wrote and tested a function to open "notepad" on Windows, you can call it before the calls to injkeys() in the sys_tick_handler.

// Open "notepad" in Windows
void run_notepad()
{
	#define LEFT_GUI_KEY 0x08 // Key modifier
	
	// Inject Left Gui (Winkey) + "r", to open the "run" console
	injkeys("r", LEFT_GUI_KEY);

	//Wait for the "run" console to open before injecting command
	for (unsigned int i = 0; i != 1500000; ++i) {
		__asm__("nop");
	}

	// Inject string "notepad" + Enter key
	injkeys("notepad\r",0);
}

from tomu-quickstart.

evyatartamir avatar evyatartamir commented on July 24, 2024

@xobs Following PR #115, can this issue be closed?

from tomu-quickstart.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.