Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Basic keypress-controlled effects #276

Closed
manskou opened this issue Jan 12, 2017 · 40 comments
Closed

[Enhancement] Basic keypress-controlled effects #276

manskou opened this issue Jan 12, 2017 · 40 comments

Comments

@manskou
Copy link

manskou commented Jan 12, 2017

I couldn't think of a better title, soo here's the deal:

In order to be able to make profiles for games without an RGB lighting API, some keypress-controlled effects should be made like the following:

  • On keypress, the key (or a key area) switches on and off rapidly, for a set amount of time, and then comes back to normal state (on or off)

  • Pressing the key, makes it (or a key area) toggle between different colors.

    • Pressing a key, makes some other key (or area) change colors. That can be used i.e. in a FPS game with 3 weapon types (toggled by 1,2,3 buttons), each time you take out the first weapon by pressing 1, the color is set to A, press 2 and color is set to B etc.

    In case something happens and the order gets messed up (you die with weapon 2 and respawn with weapon 1, but the color is still A) the user can set a hotkey that will reset the order. Also, a "disable" (toggle/hold) key should be able to be set. i.e pressing T to open chat disables some layers... (but you wont be able to use the T key.... will have to think of something else instead...)

  • If those are something extremely difficult, for starters, I think you could implement the ability to enable or disable a layer with a keypress.

I think I had some more ideas but I don't seem to be able to recall them...
Anyways, hope you like 'em!

@RobertBeekman
Copy link
Member

Hello, some good ideas here, I've thought about 'guessing' what's going on by watching keyboard input but as you stated yourself it's very unreliable.

This kinda matches with #254. I might not be able to do all of it but we'll see how it goes. (Won't be in the next update but keybindings and LightFX (such as LoL) support are my next point of focus after that)

@adamscybot
Copy link

adamscybot commented Jan 17, 2017

I've been wanting this. Also mouse input as well. Take this example of overwatch:

https://www.youtube.com/watch?v=DD-y5cEsqrc

Some of these affects would be great when your character is shooting, i.e. left mouse button is depressed. Think crazy pink ripples when DVA shoots or a slow yellow moving gradient when mercy heals. And slow moving blue on secondary fire (i.e right mouse button depressed).

We could create a seriously awesome default profile for overwatch and other games with this.

Granted, it would also do it on the hero selection screen when you are clicking around and not necessarily shooting -- as I'm guessing the game provides no hooks for this via the razer dll. But I'd certainly prefer it over not being able to do it. This is a simpler case than "toggles" trying to match game state I think.

@RobertBeekman
Copy link
Member

@adamscybot You could do most of the things in the video already by expanding the current Overwatch profile :)

I'm currently a little low on time due to midterms but it's still the first thing on my list after the next release

@RobertBeekman
Copy link
Member

Here's a little preview of what I currently have.

Alongside regular conditions you can now add key-press conditions. They work together with normal conditions. This means you can have a layer activate when a hotkey is pressed and a different condition is also met.

You can toggle a layer on and off with the same key
image

You can show a layer as long as you hold down a certain key, or combination of keys
image

An example of how you can combine multiple keybinds. This layer activates after you press Ctrl+C and stays active until you press Ctrl+V
image

@adamscybot
Copy link

This is great. So with this I could for example, apply an overlay when space is held but only when a certain hero on overwatch is set?

Are mouse button bindings a possibility?

@ghost
Copy link

ghost commented Feb 6, 2017

This is amazing! When is it going to be added?

@RobertBeekman
Copy link
Member

@adamscybot yep, you could just combine this with another condition such as hero being Pharah.
Mouse should be possible, not looked into it yet

@Vanitied hopefully this week if nothing breaks

@manskou
Copy link
Author

manskou commented Feb 6, 2017

Sounds really amazing. Also, how about that blinking/strobing effect. Also, a time modifier? Not sure if you can achieve those with these new additions, or even with lua. If that's the case, could you provide me with an example?

@ghost
Copy link

ghost commented Feb 6, 2017

Dont mean to piggyback on another thread, but is there a way to bring game conditions into a windows profile?

@RobertBeekman
Copy link
Member

@Vanitied not really, they are two fundamentally different things. What would the benefit of this be?

@RobertBeekman
Copy link
Member

RobertBeekman commented Feb 11, 2017

Looking for feedback on this, please try the latest beta :)
Mouse has proven to be a bit difficult, I had something going but it was sometimes introducing mouse lag

https://github.com/SpoinkyNL/Artemis/releases/tag/1.8.2.0

@ghost
Copy link

ghost commented Feb 11, 2017

I am attempting to update to the pre release, which i assume you do by placing update.exe and "Release" in the artemis directory, but running Update.exe yields this in the squirrelssetup log.

2017-02-11 19:31:02> Program: Starting Squirrel Updater: --processStart Artemis.exe
2017-02-11 19:31:02> Program: Want to launch 'C:\Users\Luke\AppData\Local\Artemis\app-1.8.1.0\Artemis.exe'
2017-02-11 19:31:02> Program: About to launch: 'C:\Users\Luke\AppData\Local\Artemis\app-1.8.1.0\Artemis.exe':
2017-02-11 19:33:25> Program: Starting Squirrel Updater: `

Am i doing this completely wrong?

@RobertBeekman
Copy link
Member

Ah, sorry. The Update.exe is ran by Artemis itself so I had to include it.

To use this, extract all files and run Artemis.exe in the Release folder

@ghost
Copy link

ghost commented Feb 11, 2017

OK. Progress. I am met with "Artemis has stopped working" whenever I run Artemis.exe in the release folder.

@RobertBeekman
Copy link
Member

Is this with Update.exe present one directory level higher?

If it won't work I'll make a setup

@ghost
Copy link

ghost commented Feb 11, 2017

Hey, maybe my pc just has a gremlin.
File structure is:

Test folder: update.exe, release
Release: Artemis.exe and its other files.

@manskou
Copy link
Author

manskou commented Feb 14, 2017

Just extract it and run the exe, no need to worry about updating. That's how I did it.

My feedback on the beta:

  • The hotkey enable-disable work as promised, wasn't able to test it on a game extensively but I will soon (possibly today).
  • The interface seems oddly laggy, compared to the previous version, not sure if its the beta's fault.
  • this error appeared:
System.InvalidCastException

Message:
Unable to cast object of type 'Artemis.Profiles.Layers.Types.Keyboard.KeyboardPropertiesModel' to type 'Artemis.Profiles.Layers.Types.KeyPress.KeyPressPropertiesModel'.

Stack Trace:
   at Artemis.Profiles.Layers.Types.KeyPress.KeyPressType.KeyboardHookOnKeyDownCallback(KeyEventArgs e) in C:\Repos\Artemis\Artemis\Artemis\Profiles\Layers\Types\KeyPress\KeyPressType.cs:line 124
   at Artemis.Utilities.Keyboard.KeyboardHook.KeyDownCallbackHandler.Invoke(KeyEventArgs e)
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Artemis.Utilities.Keyboard.KeyboardHook.<VirtualKeyboardOnKeyDown>d__3.MoveNext() in C:\Repos\Artemis\Artemis\Artemis\Utilities\Keyboard\KeyboardHook.cs:line 22
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

TargetSite:
Void KeyboardHookOnKeyDownCallback(System.Windows.Forms.KeyEventArgs)

Source:
Artemis

HResult:
-2147467262

multiple times:
image

and after a few mins it crashed

Will test more and post again.

@manskou
Copy link
Author

manskou commented Feb 14, 2017

Run/Attempt 1

I tried making a new layer and set the keybind thing aaaaaand

An unexpected error occurred in Artemis.

Object reference not set to an instance of an object.
____________________________________________________
System.NullReferenceException

Message:
Object reference not set to an instance of an object.

Stack Trace:
   at MahApps.Metro.Controls.HotKey.Equals(HotKey other) in d:\projects\git\MahApps.Metro\src\MahApps.Metro\MahApps.Metro.Shared\Controls\HotKeyBox.cs:line 235
   at Artemis.Models.KeybindModel.InvokeIfMatched(HotKey hotKey) in C:\Repos\Artemis\Artemis\Artemis\Models\KeybindModel.cs:line 21
   at Artemis.Managers.KeybindManager.KeyboardHookOnKeyDownCallback(KeyEventArgs e) in C:\Repos\Artemis\Artemis\Artemis\Managers\KeybindManager.cs:line 35
   at Artemis.Utilities.Keyboard.KeyboardHook.KeyDownCallbackHandler.Invoke(KeyEventArgs e)
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Artemis.Utilities.Keyboard.KeyboardHook.<VirtualKeyboardOnKeyDown>d__3.MoveNext() in C:\Repos\Artemis\Artemis\Artemis\Utilities\Keyboard\KeyboardHook.cs:line 22
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

TargetSite:
Boolean Equals(MahApps.Metro.Controls.HotKey)

Source:
MahApps.Metro

HResult:
-2147467261

also this:

An unexpected error occurred in Artemis.

Exception has been thrown by the target of an invocation.

Object reference not set to an instance of an object.
____________________________________________________
System.Reflection.TargetInvocationException

Message:
Exception has been thrown by the target of an invocation.

Stack Trace:
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Caliburn.Micro.ActionMessage.<>c.<.cctor>b__33_0(ActionExecutionContext context)
   at Caliburn.Micro.ActionMessage.Invoke(Object eventArgs)
   at System.Windows.Interactivity.TriggerBase.InvokeActions(Object parameter)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.Controls.Control.HandleDoubleClick(Object sender, MouseButtonEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.UIElement.OnMouseDownThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

TargetSite:
System.Object InvokeMethod(System.Object, System.Object[], System.Signature, Boolean)

Source:
mscorlib

HResult:
-2146232828
____________________________________________________
System.NullReferenceException

Message:
Object reference not set to an instance of an object.

Stack Trace:
   at MahApps.Metro.Controls.HotKey.Equals(HotKey other) in d:\projects\git\MahApps.Metro\src\MahApps.Metro\MahApps.Metro.Shared\Controls\HotKeyBox.cs:line 235
   at Artemis.Models.KeybindModel.InvokeIfMatched(HotKey hotKey) in C:\Repos\Artemis\Artemis\Artemis\Models\KeybindModel.cs:line 21
   at Artemis.Managers.KeybindManager.KeyboardHookOnKeyDownCallback(KeyEventArgs e) in C:\Repos\Artemis\Artemis\Artemis\Managers\KeybindManager.cs:line 35
   at Artemis.Utilities.Keyboard.KeyboardHook.KeyDownCallbackHandler.Invoke(KeyEventArgs e)
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Artemis.Utilities.Keyboard.KeyboardHook.<VirtualKeyboardOnKeyDown>d__3.MoveNext() in C:\Repos\Artemis\Artemis\Artemis\Utilities\Keyboard\KeyboardHook.cs:line 22
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Window.ShowHelper(Object booleanBox)
   at System.Windows.Window.ShowDialog()
   at CallSite.Target(Closure , CallSite , WindowManager , LayerEditorViewModel , Object , Object )
   at Artemis.Services.WindowService.ShowDialog[T](String dialogName, IParameter[] param) in C:\Repos\Artemis\Artemis\Artemis\Services\WindowService.cs:line 36
   at Artemis.Models.ProfileEditorModel.EditLayer(LayerModel layer, ModuleDataModel dataModel) in C:\Repos\Artemis\Artemis\Artemis\Models\ProfileEditorModel.cs:line 53
   at Artemis.ViewModels.ProfileEditorViewModel.EditLayer() in C:\Repos\Artemis\Artemis\Artemis\ViewModels\ProfileEditorViewModel.cs:line 213

TargetSite:
Boolean Equals(MahApps.Metro.Controls.HotKey)

Source:
MahApps.Metro

HResult:
-2147467261

And then Artemis crashed

Run/Attempt 2

No crashes yet, I made three layers, 1 was to become enabled when 1 is pressed, and disable when 2 or 3 are pressed, 2nd was to become enabled when 2 is pressed, and disable with 1 or 3, 3rd was when 3 is pressed, and disable when 1 or 2 are pressed.

As it seems, Pressing 1, 2 ,3 enables and disables only the first layer.

The culprit could be the way the keybinds are set up, they only hook to the first layer that u set them up with.

Testing "Held Down"

I set up a folder that enables when Z is pressed and lights up C and V with different colours, the only thing I noticed was that upon releasing Z, there would be a delay (I would guess 800-1000 ms) until the lights turn off.

General Feedback

I think that some general keys like alt or shift could be added aswell, that way we could resolve #254 really well. I'm willing to make a custom profile for these modifiers if you like.

Also, mouse functions (left click, right click, scroll button ect) should be added to the keybinds as well.

@ghost
Copy link

ghost commented Feb 20, 2017

Just an update on my situation:

Debugging in Visual Studio leaves me with this:

"An unhandled exception of type 'System.Windows.Markup.XamlParseException' occurred in PresentationFramework.dll

Additional information: The invocation of the constructor on type 'Artemis.ArtemisBootstrapper' that matches the specified binding constraints threw an exception."

@RobertBeekman
Copy link
Member

@manskou Thanks for the feedback, I've fixed those crashes and I'm looking into a better way to do the held-down one.

As for your example, setting up three layers like this works well for me:
http://i.imgur.com/S35hoc8.png
http://i.imgur.com/lfHv49p.png
http://i.imgur.com/MKSW7oq.png

@Vanitied are you building x64? I've not had this issue myself. Does Artemis run fine when you run with with Ctrl+F5?

@ghost
Copy link

ghost commented Feb 21, 2017

Funnily enough I haven't actually downloaded the source files and tried to build like that. When I run it it crashes and Windows gives me two options, close, and debug, the latter of which opens VS and shows me the error.

@manskou
Copy link
Author

manskou commented Feb 21, 2017

@SpoinkyNL Just tried re-opening the beta and doing what you did and each time I press the 1 button the the keybind I get there crashes, could you post another beta with the fix?

EDIT: now I cant even open the beta Artemis, I get these crashes from start....

@RobertBeekman
Copy link
Member

Please give this one a shot: artemis-1820-beta-2.zip

I reworked the key-held keybind and got rid of the crashes, should work a lot better now

@manskou
Copy link
Author

manskou commented Feb 25, 2017

Hold works fine, but the toggle-thing is a bit finicky. I set up a new profile with three layers configured as before (same as you did) and the problem presisted, pressing 1 or 2 was turning off the light, pressing 3 was turning on the 3rd layer's light. I decided to save the profile and send it to you, and while I was writing this response, it actually worked! Pressing 1 was enabling the 1st layer and disabling the others ect. So I went back to my default profile and recreated the set up and still nothing. I thought the profile was bugged or smth, so created a new profile, recreated the setup there and it still didn't work. Saved it, and still the same error. I honestly have no idea what's going on. Loading the profile that was working before does not produce the same error, it works fine.

@Baanor
Copy link

Baanor commented Mar 8, 2017

Hi, i've tried the latest Beta and adding the keybind is really cool. But i wanted to make a layer when i held down CTRL to light up ALT-TAB-C... you know all the combination. But the keybind don't work for CTRL key or ALT key.

Would it be possible to add this key ? (I've probably not explain myself enought/well so don't hesitate to ask some question ;) )

@RobertBeekman
Copy link
Member

RobertBeekman commented Mar 14, 2017

@Baanor Ctrl, Alt and Win are modifiers, I currently can't bind just those sadly :c This sucks because having something light up when holding down Ctrl is a very valid use case. I'll look into it.

Anyways, here's a new version with mouse binding support. I've done quite a bit of UI work in this one (together with me having next to no spare time atm, UI stuff is why it's taking so long)

Please let me know how this one goes. It should be fairly release-worthy, aside from the modifier keys mentioned above.

artemis-1820-beta-3.zip
Edit: Updated link

@Baanor
Copy link

Baanor commented Mar 15, 2017

@SpoinkyNL Sniff... still it's not a must have. I think you have more important thing to see before that. And don't know if your still on your study but it's should be your priority (and good luck with it ;) ).

I've tried the Beta 3, but the programm don't launch. I've tried it a second time cleaning old versions and conf and still nothing. It may be on my side, so i need to "reinstall" an older vesrions and tried it with full verbose mode to see what happen.

@RobertBeekman
Copy link
Member

RobertBeekman commented Mar 15, 2017

Hehe yeah study + work makes for very little time left

Did you extract everything so that the Update.exe is in place one folder higher than the rest? That's what can break it

Make sure the folder layout looks like this

  • artemis-1820-beta-3
    • Update.exe
    • Release
      • Artemis.exe <-- this is the one you need to run
      • Artemis.exe.config
      • ect.

If it still doesnt work can you get me a log?

  1. Head into Documents > Artemis > logs.
  2. Drag the log.txt file into the GitHub comment box, uploading it.

Thanks!

@Baanor
Copy link

Baanor commented Mar 15, 2017

@SpoinkyNL Yeah, that was that. I've directly take the release folder without update.exe... I feel dumb ><
Works fine now, thanks.

@manskou
Copy link
Author

manskou commented Mar 15, 2017

small feedback on the beta,

  • when I launch Artemis, I'm getting laggy mouse/ low desktop FPS/high GPU usage for a second or so
  • after duplicating a layer then opening the properties, I get the super long scroll bar syndrome:
    image

I will try creating a profile based on your new changes and game with it, then I'll post further feedback.

Also, how do I use mouse events as hotkeys? I don't seem to find any option...

Keybinds don't seem to work at all, here's a simple profile I made that doesn't work for me (delete the .txt in the end).

y u no.json.txt

@RobertBeekman
Copy link
Member

Oh, I forgot to take those hotkeys out of the conditions section, they are ment to be used from the keybinds section below the conditions now, please give that a go

@manskou
Copy link
Author

manskou commented Mar 16, 2017 via email

@manskou
Copy link
Author

manskou commented Mar 16, 2017

Bugs/Issues

After extensive testing I figured out these:

  • I think there should be keybind support on "Is Event"
  • Folders don't really work with keybinds, I got them working at first, but after making a big folder structure with multiple layers/folders they stopped working. Tried some cases of folders within folders and they were working. Then I tried breaking the folder structure so that the folders with the keybinds are on level 1 (or 0) and they still didn't work. Tested also with other conditions (not keybinds) and everything worked flawlessly.
    Then I tried creating a simple layer-within-a-folder and set a keybind to that folder and it didn't work....
  • Some graphical glitches and UI scaling (window resize) issues

Example where keybinds didn't work:

  • Level 1 Folder
    • Level 2 Folder
      • Level 3 Folder A (with keybind)
        • Level 4 Folder A
          • Level 5 Layer
        • Level 4 Folder B
          • Level 5 Layer
        • Level 4 Folder C
          • Level 5 Layer
        • Level 4 Layer a
        • Level 4 Layer b
        • Level 4 Layer c
      • Level 3 Folder B

Then changed to this:

  • Level 1 Folder A (with keybind) [old level 3]
    • Level 2 Folder A
      • Level 3 Layer
    • Level 2 Folder B
      • Level 3 Layer
    • Level 2 Folder C
      • Level 3 Layer
    • Level 2 Layer a
    • Level 2 Layer b
    • Level 2 Layer c

And it still didn't work

Overall

I think aside from the graphical glitches (mentioned in previous reply) I believe that the keybind implementation is really good.
There is always room for improvement, however, the current functionality is totally release-worthy!

Thanks a lot for the time you've put into this!!

@RobertBeekman
Copy link
Member

Thanks for the feedback, helps a lot! I'll go through these tomorrow

RobertBeekman pushed a commit that referenced this issue Mar 18, 2017
Added default profiles for Assetto Corsa resolving #131
Fixed default profiles for the CM Pro S resolving #316
Fixed keybinds on folders #276
Fixed window scaling with many layers #276
@RobertBeekman
Copy link
Member

RobertBeekman commented Mar 18, 2017

Here's one last beta, unless something is horribly broken this is the one I'll release tomorrow :)
Keybinds on folders now work the same way as conditions, they inherit each other.

Meaning that if you keybind a folder to toggle on D and a layer inside of that folder to toggle on A, you'll have to press them both for the layer to show. Doesn't matter in which order you press them, they both need to be toggled on for the layer to show, this makes the most sense to me.

artemis-1820-beta-4.zip

Oh, and the UI glitches I found were the conditions going really wide and the window scrolling strangely with many layers active, I've fixed both

@manskou
Copy link
Author

manskou commented Mar 18, 2017

Folders work normally now (our logic should be similar) but the "is event" thing still doesn't trigger with keybinds, I think a keybind keypress is an event and should be treated as such. I don't know if you tried implementing that but I think it adds meaningful extra functionality.

Also, while toggling the Is Event switch I got this wierd error, the selection seems disabled. Toggling the switch fixes that.

image

All in all, keybinds in their current state are pretty darn good. I can't wait to see what other users do with them!

@RobertBeekman
Copy link
Member

RobertBeekman commented Mar 18, 2017

Hey, if you setup a layer like so:
image

It should trigger the pulse event (meaning it pulses once, until you press it again).

If you also bind a condition to the event, it'll trigger either if the condition is matched or when you press the right mouse button, but if the condition is matched it will not trigger again until the condition is not longer matched (basically an event can only occur once per time it matches, else it would just keep repeating itself like a regular condition)

Oh and when you toggle Is Event, it should lock the keybind into Enable and gray it out, however it seems to always gray it out, as seen on your screenshot, that's a bug

@manskou
Copy link
Author

manskou commented Mar 18, 2017

This should enable the layer for 1000ms (1sec) and then disable it when I right click correct? because it doesn't work...
image

Basically, a keypress should be treated as a normal event condition (i.e. changing the window), so the time expiration type will work.

@RobertBeekman
Copy link
Member

RobertBeekman commented Mar 19, 2017

Yes, it should work like that, and in this version it actually does! 😅
artemis-1820-beta-5.zip

I rewrote part of the event system and the one thing I forgot to test (timed expiration) was of course broken ^^

This version should behave as you described, if anything is still doesn't make sense please let me know then I'll look into it in the morning (01:00 here!)

@manskou
Copy link
Author

manskou commented Mar 19, 2017

2:48 here hehe,
Everything works as it should now!

Also, since most users would want to use the General profile, shouldn't it be Default when pressing the General tab, instaid of Bubbles?

Anyway, this is going to be a major update and I'm very excited, thanks again for your work and goodnight! (or good morning since you're going to see that then...)

@manskou manskou closed this as completed Mar 19, 2017
RobertBeekman pushed a commit that referenced this issue Apr 12, 2021
Added default profiles for Assetto Corsa resolving #131
Fixed default profiles for the CM Pro S resolving #316
Fixed keybinds on folders #276
Fixed window scaling with many layers #276
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants