diff --git a/sk_demo/src/Mono.cs b/sk_demo/src/Mono.cs index 31d03ed..7c7323c 100644 --- a/sk_demo/src/Mono.cs +++ b/sk_demo/src/Mono.cs @@ -214,6 +214,7 @@ public class Mono { Rig.Btn keyboard_btn = new(); Vec3 index_pos = Vec3.Zero; int index_i = 0; + int last_index_i = 0; string txt = "hello "; @@ -262,12 +263,17 @@ public class Mono { index_pos.y = (float)Math.Clamp(Math.Round(index_tip.y), 0, 3-1); index_i = (int)(index_pos.y * 10 + index_pos.x); + + if (index_i != last_index_i) { + last_index_i = index_i; + // Log.Info($"index_i: {index_i}"); + monoNet.value = index_i; + monoNet.send = true; + } } if (keyboard_btn.frameDown) { - Log.Info($"index_i: {index_i}"); - monoNet.value = index_i; - monoNet.send = true; + // send haptic input for input confirmation txt += KeyToChar(index_i); }