Page 1 of 2

emulate key press and hold

Posted: Wed Feb 03, 2010 12:06 pm
by reta
I would really like EventGhost to be able to emulate a key press + hold, not only a key press or a long loop of key presses.

Re: emulate key press and hold

Posted: Wed Feb 17, 2010 12:08 pm
by Alzec
Yes it will be great :)

Re: emulate key press and hold

Posted: Sun Mar 21, 2010 12:01 am
by PooFox
it really cant do that? it probably should, no?

Re: emulate key press and hold

Posted: Sun Mar 21, 2010 12:52 am
by stottle
I can't think of a use case for this. With a keyboard, you hold down a key, then press another key. With a remote, you can't do that.

Brett

Re: emulate key press and hold

Posted: Sun Mar 21, 2010 1:05 am
by PooFox
stottle wrote:I can't think of a use case for this. With a keyboard, you hold down a key, then press another key. With a remote, you can't do that.

Brett
you seem to misunderstand. we want to be able to hold keys down with the emulator. then we can use modifier commands (like control+c to copy) with a single click. when a certain program was active you didnt need to type in much, you could simply use "c" to copy {ctrl,hold+c} or a even a remote button. this isnt possible now.

personally i would then map my 3rd and 4th mouse buttons to ctrl and alt so that i could assign a ctrl+click or alt+click to those extra buttons, which is useful to me in certain programs (cubase). but right now it will only 'fire' the button instead of holding it, even if i hold down the assinged button.

really there would be quite a lot more functionality with an addition like this. we can then also execute a long series of commands on the keyboard that includes modifier commands, enabling us to do anything that normally you can only do with a keyboard or mouse, but with purely the mouse or another remote controller.

Re: emulate key press and hold

Posted: Sun Mar 21, 2010 4:08 am
by stottle
EG is intended for HTPC use and Home Automation, not as a driver to enhance your current mouse. The design of EG is such that one event will run until completion before the next event starts. So trying to have one long running event, while other events occur, just doesn't fit well with EG.

Brett

Re: emulate key press and hold

Posted: Mon Mar 22, 2010 11:40 pm
by PooFox
stottle wrote:EG is intended for HTPC use and Home Automation, not as a driver to enhance your current mouse. The design of EG is such that one event will run until completion before the next event starts. So trying to have one long running event, while other events occur, just doesn't fit well with EG.

Brett
so youre saying it cant be done or that you cant see the value of the idea? true, i would use it for my mouse, but that is only because my remote wonder II has become useless since i "upgraded" to win7.

incidentally, it doesnt seem necessary to approach it that way; the ability to execute simultaneous keyboard or mouse events would suffice. why cant i simply take the events "Keyboard.LCtrl" and "Mouse.XButton1" and combine them into a single event "Keyboard.LCtrl&Mouse.XButton1" so that when i press them together EventGhost sees this as one event? practically speaking, holding control and then pressing c is not much different than pressing control and c at the same time. you dont think the greatly expanded functionality is worthwhile?

honestly im just looking for more ways to use eventghost rather than autohotkey for its greater ease of use. simple details like this or detecting right and left mouse clicks (and the ability to not interrupt their standard usage--- ~ in ahk) would make many new things possible that we can currently only do by mastering the autohotkey language. certainly not too many are up for that task. eventghost is so much simpler and more comprehensible.

but maybe this is really not possible, or maybe its just not that important to the devs here, i cant tell. regardless, much thanks for eventghost.

Re: emulate key press and hold

Posted: Tue Mar 23, 2010 1:57 am
by stottle
Without a significant rewrite to the core of EG, you can't "simply" take a mouse event and a keyboard event and combine them. One event happens until completion, then the next event happens until completion. They aren't both available at the same time. Now, since EG is opensource, you are free to try to get someone else to make your proposed mod, or make it yourself. I don't see the value, so unless I hear a far better use case, I don't have much interest. That's just my opinion.

Now if you specifically want to handle your proposed mouse/keyboard scenario, it would be possible to write plugin that would check the status of the mouse buttons and modify keyboard commands under certain conditions. I still don't think that is simple, but it could be done without modification to EG's core.

I don't speak for EG, I am just trying to explain the complexity involved since I understand the code fairly well.

Brett

Re: emulate key press and hold

Posted: Tue Mar 23, 2010 12:28 pm
by PooFox
yea thanks, im not a programmer. but i still find it hard to understand why you find it hard to understand how beneficial this would be. the untapped potential of eventghost remains untapped...

Re: emulate key press and hold

Posted: Wed Mar 24, 2010 7:48 am
by jinxdone
I did pitch the same idea to the EG core dev's a while back, but none of them saw the value in this. I think it should definately work this way, like a state machine.

The reason why it's not done already is because it's such an immense task.. Basically the whole inner working of EG needs to be revised. For the time being EG works like a queue of events that are processed in the order they were triggered in.

Re: emulate key press and hold

Posted: Thu Mar 25, 2010 2:05 am
by Livin
2 questions...

1) I don't know of a situation to use a simultaneous KB & Mouse command - can you give a few examples?
- I've never ran into such a need and I do a ton with home automation & home theater so I cannot think of one.

2) Would it be possible to do this in pure Python, vbscript, or some other code? Then use EG to launch that code?

Re: emulate key press and hold

Posted: Fri Mar 26, 2010 8:11 pm
by PooFox
Livin wrote:2 questions...

1) I don't know of a situation to use a simultaneous KB & Mouse command - can you give a few examples?
- I've never ran into such a need and I do a ton with home automation & home theater so I cannot think of one.

2) Would it be possible to do this in pure Python, vbscript, or some other code? Then use EG to launch that code?
well i use eventghost for just about everything but home theater automation... i do mostly music editing and recording so i need a lot of modifier commands for my mouse and keyboard. but now that you mention it, i didnt realise eg could run python scripts, ill definitely look more into that. what i was trying to map however that basically lead to this thread was ctrl+xbutton1 (one of the extra buttons on my mouse) to execute an alt+up (folder up) command in windows since they decided to leave that out of explorer in win7. i just would have liked to use eventghost for everything instead of learning the code to write scripts since its so easy to use and organize.

i guess as long as eg is geared towards home automation and whatnot ill be asking to much for it to do everything. i just saw it as a kind of macro program that was much easier to use than something like autohotkey, which required me to teach myself some code technique.

i suppose if its such a big deal to make this work than ill lay off, but i just always feel like theres a workaround if youre crafty enough to find it. but then ive wasted loads of time failing on such quests myself...

Re: emulate key press and hold

Posted: Wed Jun 01, 2011 7:45 pm
by ArminTamzarian
Wow, who would have thought implementing such a feature would be so controversial?

Sorry to bump up this old thread, but since there did not appear to be any real-world examples of why the keyboard press-and-hold capability would be a useful feature that were acceptable to the EG developers, I thought I would list one:

Quite simply, some applications find it very difficult (for whatever reason) to detect keyboard presses of extremely short duration. They may not recognize, for example, a 'Left Arrow' key being depressed if it is just quickly 'tapped', though they may have no problem detecting such a keystroke if the key were to be pressed and held down for, say, a quarter of a second. For such applications, it would be quite useful to be able to simulate a given key being depressed for X milliseconds, as it may be that even a dozen repeated 'terse' keystrokes sent by EG may simply not be recognizable by those apps. Such a 'held' keystroke could be associated with, say, an MCE remote button depression, allowing reliable control of the finicky application without need for the actual PC keyboard.

I can't imagine why one would have any difficulty seeing the value in having this capability. Unless one has never encountered a 'picky' app, I suppose...

Re: emulate key press and hold

Posted: Thu Jun 02, 2011 10:13 am
by zian
Have you searched this forum for an "Alt-Tab" - Task Switching command/script?
Not sure if it is what you all want/need but it does "press" down a key and leaves it down... 'till a 2nd or 3rd command releases that key.

Edited.

Re: emulate key press and hold

Posted: Wed Jun 08, 2011 11:45 pm
by ArminTamzarian
I have no idea what an "Alt Tab Del" command/script is, and searching the forum for such a beast yielded no results. Can you elaborate further?