Author Topic: Keyboard Layout Switching with Automatic Caps Lock Control  (Read 427 times)

bloe

  • Newbie
  • *
  • Posts: 4
Keyboard Layout Switching with Automatic Caps Lock Control
« on: July 19, 2024, 11:15:57 AM »
Hello, is it possible to make the keyboard layout switch toggle the Caps Lock on and off when needed? What happened to me is that when I create a macro command that includes Shift + Alt and then Caps Lock, there are instances where, when I switch to my language, the Caps Lock remains on, and as a result, I am still typing in English.
Thanks.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4780
  • RTFM
Re: Keyboard Layout Switching with Automatic Caps Lock Control
« Reply #1 on: July 19, 2024, 11:45:15 AM »
If you'd like to make sure Caps Lock is off, you can use a structure like this:
Code: [Select]
Begin Text Compare : [{CAPSLOCKON}] Equals '1'
    Press Caps Lock key and hold for 0.05 seconds and release
End Condition
which would press the Caps Lock key to turn off Caps Lock only when Caps Lock is already on.

bloe

  • Newbie
  • *
  • Posts: 4
Re: Keyboard Layout Switching with Automatic Caps Lock Control
« Reply #2 on: July 19, 2024, 12:17:48 PM »

Thank you, but
I'm sorry,  I don't understand how to do this in the software.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4780
  • RTFM
Re: Keyboard Layout Switching with Automatic Caps Lock Control
« Reply #3 on: July 19, 2024, 12:22:05 PM »
"Other >", "Advanced", "Begin a Conditional (If Statement) Block", "Single Condition"

On the "Text" tab paste
Code: [Select]
{CAPSLOCKON}into the "Variable Name / Token" field, and
Code: [Select]
1into the "Text" field

Insert a keypress action that presses the Caps Lock key in-between the "Begin" and "End" items in the action list.

bloe

  • Newbie
  • *
  • Posts: 4
Re: Keyboard Layout Switching with Automatic Caps Lock Control
« Reply #4 on: July 19, 2024, 01:20:10 PM »
Thank you so much! It works!

Another question: Is there anything that can be done for faster recognition of the command? Currently, there is about a two-second delay after saying the command.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4780
  • RTFM
Re: Keyboard Layout Switching with Automatic Caps Lock Control
« Reply #5 on: July 19, 2024, 01:22:57 PM »
Potentially, assuming the command phrase(s) are distinct enough. Have a look at this topic.

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2831
Re: Keyboard Layout Switching with Automatic Caps Lock Control
« Reply #6 on: July 19, 2024, 01:53:22 PM »
Most command recognition should have a subsecond response time.  A two-second delay may indicate a borked or untrained speech profile.   You'll want to take a look at this thread:  https://forum.voiceattack.com/smf/index.php?topic=64.0   (ignore the title).

bloe

  • Newbie
  • *
  • Posts: 4
Re: Keyboard Layout Switching with Automatic Caps Lock Control
« Reply #7 on: July 21, 2024, 03:12:24 AM »
Thank you  ;D