How do I toggle between two layers (with 3+ layers)?

x64 Replacement/Alternative to Microsoft's IntelliMouse application.
Forum rules
Please read the forum rules before posting for the first time.
The more information you can provide, the quicker and more accurately someone can help.
Post Reply
badbob001
New User
Posts: 12
Joined: Mon Apr 20, 2015 3:16 pm

How do I toggle between two layers (with 3+ layers)?

Post by badbob001 » Mon Dec 11, 2017 6:05 pm

I want to set a mouse button to toggle between two layers. When I only have two layers, I can just set that button to 'Layer (next)' and it works since the later selection wraps around from 2 to 1. When I wanted 3+ layers but still have that button only toggle between layers 1 and 2, then I can't figure out how to do it.

So with 3+ layers, I can't simply use 'layer (next)'. So I tried under layer 1, have the button trigger 'layer 2'. Then under layer 2, I tried to have the same button trigger back to 'layer 1'. But then I get this error:
You can not add a LAYER X modifier to this layer because another layer already has a layer modifier setup to this layer. Doing so would cause undetermined behavior and is therefore not supported.
I don't really understand the error. Perhaps I'm misunderstanding the 'layer x' command. Is it not a change-to-layer-x command?

badbob001
New User
Posts: 12
Joined: Mon Apr 20, 2015 3:16 pm

Re: How do I toggle between two layers (with 3+ layers)?

Post by badbob001 » Mon Dec 11, 2017 6:54 pm

I managed to use the simulated key {LAYER:x} to switch to a specific layer. So my config has one mouse button toggle the wheel from up/down to pageup/down and another button to toggle between up/down and home/end.

layer 1 (mouse wheel up/down normal)
mouse 4: {LAYER:2}
mouse 5: {LAYER:3}

layer 2 (mouse wheel page-up/down):
mouse 4: {LAYER:1}
mouse 5: {LAYER:3}

layer 3 (mouse wheel home/end):
mouse 4: {LAYER:1}
mouse 5: {LAYER:4}

layer 4 (mouse wheel up/down normal):
mouse 4: {LAYER:2}
mouse 5: {LAYER:3}

User avatar
injtsvetkov
Fanatic
Posts: 256
Joined: Mon Jun 06, 2016 8:51 am

Re: How do I toggle between two layers (with 3+ layers)?

Post by injtsvetkov » Mon Dec 11, 2017 11:55 pm

Why don't you use Button chording for that?

Actually I have to admit you've achieved that quite elegantly with the {layer:x} command :), but it seems to me it would be simpler with Button chording.
HAMA Mirano
Windows 8.1 x64, Intel i5-3230M @ 2.60GHz, 4GB

User avatar
phil
Site Admin
Posts: 5528
Joined: Sun Apr 06, 2003 11:12 pm

Re: How do I toggle between two layers (with 3+ layers)?

Post by phil » Tue Dec 12, 2017 1:07 am

badbob001 wrote:
Mon Dec 11, 2017 6:05 pm
You can not add a LAYER X modifier to this layer because another layer already has a layer modifier setup to this layer. Doing so would cause undetermined behavior and is therefore not supported.
I don't really understand the error. Perhaps I'm misunderstanding the 'layer x' command. Is it not a change-to-layer-x command?
This is because the layer commands in the drop downs are for when the button is held, not pressed. That is, the layer is changed WHILE you hold the button and when you release it, the layer is changed back. This is why it does not allow you to change the dropdown on the target layer. Your simkey solution is the best bet, because with sim keys, its a change layer (and don't change back when the button is released).

Or perhaps as mentioned, in this particular case, button chording might be just as good/easier to understand!
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-6600k, Asus 170-A, 16GB DDR4,
nVidia GeForce GTX 970, 2xEvo 850 (RAID 0), 2x2TB WD Black (RAID1)

badbob001
New User
Posts: 12
Joined: Mon Apr 20, 2015 3:16 pm

Re: How do I toggle between two layers (with 3+ layers)?

Post by badbob001 » Tue Dec 12, 2017 1:41 am

My previous implementation was using chording, but it was tiring to hold the button down throughout a scroll and the layer switching was inconsistent. I then decided I essentially wanted a mode toggle than a modifier key.

User avatar
injtsvetkov
Fanatic
Posts: 256
Joined: Mon Jun 06, 2016 8:51 am

Re: How do I toggle between two layers (with 3+ layers)?

Post by injtsvetkov » Tue Dec 12, 2017 2:01 pm

Well I'm not sure I understand how you did it with chording but there is no need to change layers. For example I've set "fast scrolling" like that:
RMB+Wheel Up = {MWUP}{MWUP}{MWUP}{MWUP}{MWUP}{MWUP}{MWUP}{MWUP}{MWUP}{MWUP}
RMB+Wheel Down = {MWDN}{MWDN}{MWDN}{MWDN}{MWDN}{MWDN}{MWDN}{MWDN}{MWDN}{MWDN}
I use it for my brouser, excel, word etc. and it's very convenient.
HAMA Mirano
Windows 8.1 x64, Intel i5-3230M @ 2.60GHz, 4GB

User avatar
phil
Site Admin
Posts: 5528
Joined: Sun Apr 06, 2003 11:12 pm

Re: How do I toggle between two layers (with 3+ layers)?

Post by phil » Wed Dec 13, 2017 12:55 am

injtsvetkov wrote:
Tue Dec 12, 2017 2:01 pm
Well I'm not sure I understand how you did it with chording but there is no need to change layers. For example I've set "fast scrolling" like that:
RMB+Wheel Up = {MWUP}{MWUP}{MWUP}{MWUP}{MWUP}{MWUP}{MWUP}{MWUP}{MWUP}{MWUP}
RMB+Wheel Down = {MWDN}{MWDN}{MWDN}{MWDN}{MWDN}{MWDN}{MWDN}{MWDN}{MWDN}{MWDN}
I use it for my brouser, excel, word etc. and it's very convenient.
I think badbob's point is that he does not want to have to hold the button down (chord button) while scrolling. So his solution works using layer toggles...
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-6600k, Asus 170-A, 16GB DDR4,
nVidia GeForce GTX 970, 2xEvo 850 (RAID 0), 2x2TB WD Black (RAID1)

User avatar
injtsvetkov
Fanatic
Posts: 256
Joined: Mon Jun 06, 2016 8:51 am

Re: How do I toggle between two layers (with 3+ layers)?

Post by injtsvetkov » Wed Dec 13, 2017 12:12 pm

badbob001 wrote:
Tue Dec 12, 2017 1:41 am
...and the layer switching was inconsistent.
Yea, that makes sense, but he mentioned layer switching while using chording :roll:
HAMA Mirano
Windows 8.1 x64, Intel i5-3230M @ 2.60GHz, 4GB

badbob001
New User
Posts: 12
Joined: Mon Apr 20, 2015 3:16 pm

Re: How do I toggle between two layers (with 3+ layers)?

Post by badbob001 » Wed Dec 13, 2017 2:08 pm

injtsvetkov wrote:
Wed Dec 13, 2017 12:12 pm
badbob001 wrote:
Tue Dec 12, 2017 1:41 am
...and the layer switching was inconsistent.
Yea, that makes sense, but he mentioned layer switching while using chording :roll:
The chording method did not use layer switching. Sorry for the confusion.

Post Reply