KinesisCorporation / SmartSetApps

SmartSet apps for keyboards, foots pedals and more
GNU General Public License v3.0
60 stars 25 forks source link

SmartSet crash on specific configuration #11

Open eproxus opened 1 year ago

eproxus commented 1 year ago

The SmartSet app v1.0.2 crashes on both Windows and macOS with the following in layouts/layout1.txt:

<base>
[rctr]>[rwin]
[rwin]>[lalt]
[bsls]>[eql]
[cbrk]>[bsls]
[lctr]>[lwin]
[lalt]>[lctr]
[eql]>[cbrk]
[lfn]>[fn2s]
[caps]>[int#]
[hk1]>[plpa]

<keypad>
[rctr]>[rwin]
[rwin]>[lalt]
[bsls]>[eql]
[cbrk]>[bsls]
[lctr]>[lwin]
[lalt]>[lctr]
[eql]>[cbrk]
[caps]>[int#]
[hk1]>[plpa]

<function1>
[rctr]>[rwin]
[rwin]>[lalt]
[bsls]>[eql]
[cbrk]>[bsls]
[lctr]>[lwin]
[lalt]>[lctr]
[caps]>[int#]
[hk1]>[plpa]

<function2>
[spc]>[powr]
[rctr]>[rwin]
[rwin]>[lalt]
[0]>[0]
[hyph]>[hyph]
[bsls]>[eql]
[9]>[9]
[cbrk]>[bsls]
[6]>[mute]
[lctr]>[lwin]
[lalt]>[lctr]
[1]>[1]
[eql]>[cbrk]
[2]>[prev]
[caps]>[int#]
[4]>[next]
[3]>[plpa]
[5]>[5]
{F8}>{x1}{-lshf}{-lalt}{vol-}{+lshf}{+lalt}
{F9}>{x1}{-lshf}{-lalt}{vol+}{+lshf}{+lalt}
[hk1]>[plpa]

<function3>
[rctr]>[rwin]
[rwin]>[lalt]
[bsls]>[eql]
[cbrk]>[bsls]
[lctr]>[lwin]
[lalt]>[lctr]
[caps]>[int#]
[hk1]>[plpa]

The error is Access Violation and then the program either has to be stopped, or it freezes.

KinesisCorporation commented 1 year ago

Thanks for the report. It's presumably a single bad token somewhere in that list. We will investigate and work on fix. Let us know if you get any specifics.

jakehilborn commented 1 year ago

I'm also getting this error with my Kinesis Advantage 360 on macOS SmartSet v1.0.2. The macro shown in the diff below causes this error. If I remove this line the error goes away and I can open the SmartSet app again. Nothing in the layout here was edited manually. This was all generated by the SmartSet app. Also, the F13 macro does work on the keyboard. Currently I have to comment this line out, make edits with the SmartSet app, and then put this line back in by editing the layout.txt file directly.

<base>
[eql]>[esc]
[hk1]>[obrk]
[hk3]>[cbrk]
[esc]>[bspc]
[hk2]>[F15]
[hk4]>[F16]
[rshf]>[del]
[lfn]>[lctr]
[grav]>[null]
[caps]>[fn1s]
[left]>[F13]
[rght]>[F14]
[up]>[left]
[obrk]>[up]
[cbrk]>[rght]
[rfn]>[eql]
[lctr]>[F17]
[lalt]>[vol+]
[rwin]>[null]
[rctr]>[null]
[bspc]>[lwin]
[del]>[lalt]
[home]>[vol-]
[pgup]>[null]
[end]>[lctr]
[pgdn]>[null]
-{F13}>{s9}{x1}{-lshf}{9}{+lshf}
<keypad>
<function1>
[1]>[F1]
[2]>[F2]
[3]>[F3]
[4]>[F4]
[5]>[F5]
[6]>[F6]
[7]>[F7]
[8]>[F8]
[9]>[F9]
[0]>[F10]
[hyph]>[F11]
[bsls]>[F12]
[caps]>[defs]
<function2>
<function3>
KinesisCorporation commented 1 year ago

Looks like its actually that the App can't handle macros assigned to F-keys. We're working on fix now.

{F8}>{x} doesn't work.

wingyplus commented 1 year ago

Hi, I encounter similar issue when setup the macro like this:

 <base>
[del]>[lwin]
{lwin}>{s5}{x1}{-lshf}{spc}{+lshf}
<keypad>
<function1>
<function2>
<function3>

After removing the macro, the application can start normally.

KinesisCorporation commented 1 year ago

Using modifier keys as the sole macro trigger is technically not supported/recommended so that is why the App is crashing. We can see if there is a way to allow the App to load normally and just ignore such a macro without overwriting it.

laffed commented 1 year ago

same issue assigning macro to fn

<base>
[esc]>[lctr]
[lshf]>[fn1s]
[grav]>[lshf][t&h500][caps]
[caps]>[grav]
[left]>[9]
[rght]>[0]
[up]>[obrk]
[down]>[cbrk]
[lctr]>[esc]
[rwin]>[F16]
[del]>[lshf]
[home]>[lwin]
[pgup]>[del]
[end]>[fn1s]
[pgdn]>[rwin]
{F16}>{s8}{x1}{-lwin}{spc}{+lwin} // here
<keypad>
<function1>
[e]>[9]
[r]>[0]
[u]>[hyph]
[i]>[bsls]
[d]>[obrk]
[f]>[cbrk]
[g]>[grav]
[h]>[left]
[j]>[down]
[k]>[up]
[l]>[rght]
[lshf]>[defs]
[c]>[comm]
[v]>[perd]
[m]>[mute]
[comm]>[vol-]
[perd]>[vol+]
[caps]>[lctr]
[up]>[plpa]
[down]>[prev]
[obrk]>[next]
[lctr]>[esc]
[rwin]>[ralt]
[del]>[lshf]
[home]>[lwin]
[pgup]>[del]
[ent]>[rshf]
[end]>[defs]
[pgdn]>[rwin]
<function2>
<function3>
laffed commented 1 year ago

assigning to fn keys is probably going to be a really popular use-case because the late function keys (> fn12) are essentially how you can assign a key a unique identifier . since the keys don't actually have a unique identifier in smartset, but rather each key is defined by it's default layout value.

in the above case i want to assign a macro to the key corresponding to the default layer's rwin. but i don't want to trigger this macro when the value rwin is activated. so first assign the key corresponding to default layer rwin to a 'blank value' F16. then assign macro to trigger on F16

obviously this is still pretty unergonomic from a programming perspective. the real fix would be to have unique tokens corresponding to each physical key

KinesisCorporation commented 8 months ago

We just uploaded a Windows version 1.0.4 that should resolve this issue for you (macOS in progress). Please test and confirm if you are able.

https://kinesis-ergo.com/support/kb360/#smartset-app