Close
Showing results 1 to 6 of 6
  1. #1

    Default Broadcast all keys mode

    I don't see a broadcast mode option for HKN but it seems achievable within a script:

    Code:
    // global variable to store the current broadcast mode
    <SetVar BroadcastMode 0>
    
    // always pass keys
    <Hotkey ScrollLockOn A-Z, 0-9, Plus, Minus, F1-F12 except W, A, S, D, Q, E>
    	<SendLabel myApp>
    		<Key %Trigger%> 
    
    // pass keys only if broadcast mode enabled
    <Hotkey ScrollLockOn W, A, S, D, Q, E>
    	<If BroadcastMode is 1>
    		<SendLabel myApp>
    			<Key %Trigger%> 
    
    // toggle broadcast mode when Pause is pressed
    <Hotkey Pause>
    	<Toggle>
    		<SetVar BroadcastMode 1>
    	<Toggle>
    		<SetVar BroadcastMode 0>
    Is this the correct way to go about it or is there a built-in feature for this?
    The Orcks of War
    Shaman Borck Zorck Dorck Porck Corck
    Mixed Team - Msblonde - Mswhite - Msblack - Msred - Msbrown -

  2. #2

    Default

    Usually when people ask about broadcasting they want to send all key events (press and releases) to various windows. But I'm not sure if that's what you're asking because your script seems to be more concerned with turning hotkeys on and off. Since I'm not sure I'll answer both questions.

    The easiest way to broadcast many key combinations (it won't be all of them) is like this:

    Code:
    <MovementHotkey AllMainKeys; Alt AllMainKeys; Ctrl AllMainKeys>
       <SendLabel ....>
          <Key %Trigger%>
    That definition creates about three hundred hotkeys for almost all unmodified keys and Ctrl and Alt combinations. I used MovementHotkey for this definition because a movement hotkey sends presses and releases separately. In contrast, regular hotkeys send a press and release immediately when you press a trigger. MovementHotkeys are closer to what I understand to be "broadcasting."

    If you're asking the other question -- how to turn this sort of thing off and on -- the program gives you many choices.

    Instead of creating a variable like you're doing in the script, you can simply do this:

    Code:
    <Hotkey Pause>
       <ToggleHotkeys>
    The method used in the sample scripts is to add "ScrollLockOn" to all the definitions. This turns the scroll lock key into a toggle, and the scroll lock light on the keyboard becomes an indicator of whether hotkeys are on.

    You can also make two separate hotkeys with <TurnHotkeysOff> and <TurnHotkeysOn>.

    You can also define hotkeys so they only work when a certain application is in the foreground, which in a sense turns them on and off automatically.
    �Author of HotkeyNet and Mojo

  3. #3

    Default

    Quote Originally Posted by 'Freddie',index.php?page=Thread&postID=199464#post 199464
    Usually when people ask about broadcasting they want to send all key events (press and releases) to various windows. But I'm not sure if that's what you're asking because your script seems to be more concerned with turning hotkeys on and off. Since I'm not sure I'll answer both questions.
    Lets see if I can be a bit clearer.

    I need to operate in three different modes:
    1. Pass a specified list of keys to my windows
    2. Pass all keys to my windows
    3. Pass keys only to the window with focus


    And I need to be able to easily switch between these modes. The ScrollLockOn in my script switches between mode 1 and mode 3. The Pause key in my example script switches mode 2 on and off. So for mode 1 behaviour I would have a list with W, A, S, D excluded but when I switch to mode 2 I need to pass W, A, S, D.

    In WoW I frequently use the command line when doing quests, for instance if the quest gives you an item called Hollow Skull and requires you to use it somewhere I would type on the command line "/use Hollow Skull" and I'd like to type that in all windows. When I am moving with my other characters on follow I don't want to pass w, a, s, d however.
    The Orcks of War
    Shaman Borck Zorck Dorck Porck Corck
    Mixed Team - Msblonde - Mswhite - Msblack - Msred - Msbrown -

  4. #4

    Default

    What key(s) would you like to use to select or toggle these modes?
    �Author of HotkeyNet and Mojo

  5. #5

    Default

    ScrollLockOff - mode 3, pass keys only to window with focus
    ScrollLockOn, PauseOff - mode 1, pass limited set of keys to windows
    ScrollLockOn, PauseOn - mode 2, pass all keys to windows

    PauseOff, PauseOn is toggled by pressing the Pause key.
    The Orcks of War
    Shaman Borck Zorck Dorck Porck Corck
    Mixed Team - Msblonde - Mswhite - Msblack - Msred - Msbrown -

  6. #6

    Default

    With this script, Pause turns your hotkeys off and on. ScrollLock switches between the two key lists. (Your mode 3 is hotkeys off.)

    I reversed the keys from what you described because I can do it faster and I have to go to bed. You can do it your way too but it's more work.

    This is the whole script. As you can see it's quite short. If any of the keys control movement you can separate them out and use MovementHotkey for them, or you can just use MovementHotkey for everything.

    Code:
    <Hotkey Pause>
       <ToggleHotkeys>
    
    <KeyList BigList AllMainKeys>
    <KeyList LilList A, B, C, D>
    
    <Label ....>
    <Label ....>
    
    <Hotkey ScrollLockOn BigList; ScrollLockOn Alt BigList; ScrollLockOn Ctr lBigList>
       <SendLabel ...>
          <Key %Trigger%>
    
    <Hotkey ScrollLockOff LilList>
       <SendLabel ...>
          <Key %Trigger%>
    �Author of HotkeyNet and Mojo

Similar Threads

  1. Can not get some keys to broadcast
    By viscarscay in forum Software Tools
    Replies: 3
    Last Post: 01-11-2009, 03:38 AM
  2. Feature request: broadcast override keys.
    By DrGamut in forum Software Tools
    Replies: 7
    Last Post: 04-11-2008, 01:37 PM
  3. 2 port kvm with broadcast mode?
    By Shergar in forum General WoW Discussion
    Replies: 2
    Last Post: 01-17-2008, 03:24 PM
  4. Keys to multiple machines but not broadcast?
    By Grokk in forum General WoW Discussion
    Replies: 13
    Last Post: 07-27-2007, 04:14 PM
  5. Possible to broadcast only CERTAIN keys?
    By elninost0rm in forum General WoW Discussion
    Replies: 7
    Last Post: 06-06-2007, 11:27 PM

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •