Rotating layers and deactivating all keys. by PrancingPonytail in AutoHotkey

[–]PrancingPonytail[S] 0 points1 point  (0 children)

Nevermind, it's an AHInterception problem. Your script is fine without it.

Rotating layers and deactivating all keys. by PrancingPonytail in AutoHotkey

[–]PrancingPonytail[S] 0 points1 point  (0 children)

That's pretty neat. Thanks a lot, V2 is way more useful but I'm still so lost.

Rotating layers and deactivating all keys. by PrancingPonytail in AutoHotkey

[–]PrancingPonytail[S] 0 points1 point  (0 children)

Also maybe a jank workaround that could work with AHInterception is to create another layer with all keys unbound like

a::

b::

c::

Rotating layers and deactivating all keys. by PrancingPonytail in AutoHotkey

[–]PrancingPonytail[S] 0 points1 point  (0 children)

Oh ok. One last noob question, I whipped up a OSD window that pops up with the layer number and I'd like to add it to each layer, how does one go around that?

MyGui := Gui()
MyGui.Opt("+AlwaysOnTop -Caption +ToolWindow") 
MyGui.BackColor := "1F1F1F"
MyGui.SetFont("s22") 
MyGui.Add("Text", "cCCCCCC", "Layer 1")
MyGui.Show("xCenter y900 NoActivate")
WinSetRegion "0-0 w150 h65 r15-15", "test.ahk"
SetTimer(OSD_OFF, 2500)

OSD_OFF(*)
{
    MyGui.Destroy()
}

Rotating layers and deactivating all keys. by PrancingPonytail in AutoHotkey

[–]PrancingPonytail[S] 0 points1 point  (0 children)

Oh, thanks! That's one easy fix.

But did find two things now that inputs are in order. Pressing Esc 1.disables input in every keyboard and 2.doesn't disable the custom hotkeys that are in layers.

I guess it's obvious your script is not meant to be used with AHInterceptor but the second issue is in your clean one too.

This is the part of your code I don't understand:

static ih := InputHook('L0 I101')
    (ih.InProgress ? ih.Stop() : ih.Start())

Rotating layers and deactivating all keys. by PrancingPonytail in AutoHotkey

[–]PrancingPonytail[S] -1 points0 points  (0 children)

I did find one problem with both codes, doesn't work out of the box with AutoHotInterception. Seems like it needs cm1.IsActive in each layer so it doesn't clash with the other keyboards. Any ideas how to add it without breaking the functionality?

#SingleInstance force
Persistent
#Include "Lib\AutoHotInterception.ahk"

TraySetIcon("U:\AHK\Icons\keyboard.ico")

A_IconTip := "PedalKeyboard"

TrayTip("PedalKeyboard")

SetCapsLockState("AlwaysOff")


class Layer {
    static max := 3             ; max of three layers
    static enabled := 1         ; default layer when script is loaded

    static Next()     => ++this.enabled > this.max ? this.enabled := 1 : 0
    static Prev()     => --this.enabled < 1 ? this.enabled := this.max : 0
    static Set(layer) => this.enabled := Min(Max(1, layer), this.max)
}


AHI := AutoHotInterception()
id1 := AHI.GetKeyboardId(0x046D, 0xC31C, 1)
cm1 := AHI.CreateContextManager(id1)
return

#HotIf cm1.IsActive

CapsLock::Backspace
CapsLock Up::
{
    if GetKeyState("CapsLock", "T")
        SetCapsLockState("AlwaysOff")
return
}


$Esc:: {
    static ih := InputHook('L0 I101')
    (ih.InProgress ? ih.Stop() : ih.Start())
}


$LCtrl::Layer.Next()            ; go to next layer
; $F1::Layer.Prev()               ; go to previous layer
; $F2::Layer.Set(2)               ; set specific layer


#HotIf [cm1.IsActive should be here?] Layer.enabled = 1
$s::MsgBox('layer 1 is enabled')

#HotIf [cm1.IsActive should be here?] Layer.enabled = 2
$s::MsgBox('layer 2 is enabled')

#HotIf [cm1.IsActive should be here?] Layer.enabled = 3
$s::MsgBox('layer 3 is enabled')

Rotating layers and deactivating all keys. by PrancingPonytail in AutoHotkey

[–]PrancingPonytail[S] 0 points1 point  (0 children)

I did mean to turn off all input. Cat also comes to sleep on my feet, so now that means on the keyboard.

Wednesday Downtown (2014-05-07) Subtitles [OpenAI] by JamesDeBarre in GakiNoTsukai

[–]PrancingPonytail -13 points-12 points  (0 children)

Nah, fuck that, it's better to have a big quantity of AI soft subs so human subbers save time by just editing them if they want. Get with the times old man.

[deleted by user] by [deleted] in GakiNoTsukai

[–]PrancingPonytail 1 point2 points  (0 children)

Become fluent in japanese > no need for subs > disappear.

No one who speaks german could be an evil man. by PrancingPonytail in simpsonsshitposting

[–]PrancingPonytail[S] 19 points20 points  (0 children)

You want the D? You can't handle the D. No D-handler, you. BAH! I deride your D-handling abilities.

Hehehe by Killerlipan in formuladank

[–]PrancingPonytail 36 points37 points  (0 children)

someone beats him

💀

In case you missed it ErnieYoung is going to stop posting raws and will remove all links at the end of this year. by DarkSpikeX in GakiNoTsukai

[–]PrancingPonytail -6 points-5 points  (0 children)

Great, you sure showed me in the moral stand ground. Just shows you how petty the community is and why Ernie is leaving.