Pages: 1
  Print  
Author Topic: Detecting global keypress outside of the compile dapp  (Read 7239 times)
Offline (Unknown gender) Darkstar2
Posted on: July 18, 2018, 12:24:01 pm
Member
Joined: Jan 2014
Posts: 1238

View Profile Email
I am working on a specific project where I would like to detect keypresses but from OUTSIDE of my application, even when it is not focused.  Example, my compiled application is running, and I am using another application outside of it.  When CTRL-C is detected, my compiled application detects it and triggers whatever event .......

Currently I know how to detect keyboard and mouse events from within the application.  Is there a method for me being able to detect key combinations (i.e. CTRL-C, etc.) outside of my application while it is running ?
Thanks.
Logged
Offline (Unknown gender) The_Watcher
Reply #1 Posted on: August 05, 2018, 12:35:17 pm
Member
Joined: Aug 2018
Posts: 6

View Profile
lolz Are you serious guy ? you will need to look elsewhere for your script kiddie project, I'm afraid you are on the wrong side of the pond, you'll have to learn coding to do what you are trying to accomplish - and your finished product would likely have to be a DLL - not something you can do with this product, there's not much you CAN do with this product anyway so it's time to move away from n00b territory.
Logged
Offline (Male) HitCoder
Reply #2 Posted on: August 06, 2018, 08:06:36 pm

Member
Location: Oxford, England
Joined: Aug 2014
Posts: 157

View Profile WWW Email
lolz Are you serious guy ? you will need to look elsewhere for your script kiddie project, I'm afraid you are on the wrong side of the pond, you'll have to learn coding to do what you are trying to accomplish - and your finished product would likely have to be a DLL - not something you can do with this product, there's not much you CAN do with this product anyway so it's time to move away from n00b territory.

grow the fuck up before posting in a forum full of sophisticated adults.

now we have that out of the way, i don't think it's built in. probably for um... security reasons maybe..? like, we don't want people jumping in here and making keyloggers with enigma, that'd be bad.
though, i'm sure you could make an extension for enigma that supports it.

also fam, there's low probability of darkstar being a skid, i don't think anyone here is. or if they are, this is where they go from skid to knowledgable dev because of the small bits of grit you sometimes find.
communication is key there though
Logged
Computer Scientist, Programmer in C#, C/C++, Java, Python, GML, EDL, and more. Hobbyist musician.
DISCORD: HitCoder#4530
Offline (Unknown gender) Wendigo
Reply #3 Posted on: August 10, 2018, 07:38:23 am
Member
Joined: Apr 2015
Posts: 42

View Profile
What exactly are you trying to achieve?
If it is just data transfer between applications maybe the clipboard is sufficient: https://enigma-dev.org/docs/Wiki/Clipboard_get_text
You could also exchange data via network connection but that would require the other application to support his.
Logged
Offline (Unknown gender) Darkstar2
Reply #4 Posted on: August 12, 2018, 12:38:34 am
Member
Joined: Jan 2014
Posts: 1238

View Profile Email
lolz Are you serious guy ? you will need to look elsewhere for your script kiddie project, I'm afraid you are on the wrong side of the pond, you'll have to learn coding to do what you are trying to accomplish - and your finished product would likely have to be a DLL - not something you can do with this product, there's not much you CAN do with this product anyway so it's time to move away from n00b territory.

Wow this is not the response I was expecting though. Though you might be partially right, I guess this is something I will have to code from scratch (global key detection / hooks) etc, and FYI I'm not a script kiddie, if I was I probably would not be here - This is for a specific project to help with some of the work I do where i have to copy content from point A to point B on a regular basis, so what I was looking to do is detect CTRL-C outside the app, once this is done, read from the clipboard and store inside an array - when detecting CTRL-V, it would go through the array and provision the clipboard with the new values on each CTRL-V press, this is for a very specific use, PERSONAL use not for distribution and for legit work, this would be a time saver to me, so it's not a script kiddie project :/ Though I thought that maybe there was a way to use ENIGMA to detect keypresses outside of the running instance, guess not.


Logged
Offline (Unknown gender) Darkstar2
Reply #5 Posted on: August 12, 2018, 07:44:22 pm
Member
Joined: Jan 2014
Posts: 1238

View Profile Email
Hey my old friend, DarkStar2! :D

I had a quick look in the ENIGMA source and couldn't see what was tying keyboard input to the engine.

When ever I have dealt with keyboard input in C++, I have always had to make sure my own window is in focus (in code) otherwise I would pick up key presses from other applications as well. Which is the exact opposite of what you are after.

Maybe I can write something for you to grab all key presses. Would you be happy having your project talk to a DLL? This would be the quickest way for me to help with what you are after.

What I am looking for essentially is a way to detect key presses OUTSIDE the running instance.
The only thing I want to be able to detect is CTRL-C and CTRL-V, whenever CTRL-C is detected, it grabs the clipboard content adds it to an array, whenever CTRL-V is detected it increments the position in an array, grabs whatever is at the current position places in the clipboard.

I could somehow pull some magic using ENIGMA but it would require going in and out of focus manually, which is quite tedious.

As far as talking to DLLs I am not familiar with that, never had to do so in GMS or ENIGMA, that would be new to me. First, I need to get ENIGMA installed :D  With the MSYS2 method I am unable to - LGM crashes at startup and cannot find the enigma dll even though it is there, in the right spot where it should be :D

Thanks though :) I will try another alternative idea first, once I get ENIGMA installed and running
Logged
Pages: 1
  Print