topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 12:04 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: DONE: Key combination tally  (Read 7347 times)

ald4

  • Participant
  • Joined in 2009
  • *
  • Posts: 9
    • View Profile
    • Donate to Member
DONE: Key combination tally
« on: November 25, 2016, 01:36 PM »
I have a new job where I'm required to process a certain number of tickets per hour, but they don't tell you how many you've done at the time. They tell you later.

The keyboard shortcut to finish a ticket is Shift+Enter. I'd like a tally of how many times I've clicked Shift+Enter.



I thought I'd solve this myself using Sharpkeys to remap Shift+Enter to a single key and then find another bit of software somewhere to count how many times that key was pressed, but found Sharpkeys can't do a combination.

Would love an on-screen tally that could be onscreen all the time, like something that goes on top of other windows or displayed in the system tray.

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
Re: DONE: Key combination tally
« Reply #1 on: November 25, 2016, 02:03 PM »
Sounds like a job for Skwire's KeyCounter

ald4

  • Participant
  • Joined in 2009
  • *
  • Posts: 9
    • View Profile
    • Donate to Member
Re: DONE: Key combination tally
« Reply #2 on: November 25, 2016, 02:33 PM »
Sounds like a job for Skwire's KeyCounter

Just had a quick look. Looks like it can capture Enter fine but Not a combination like Shift+Enter.  :(

IainB

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 7,540
  • @Slartibartfarst
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: DONE: Key combination tally
« Reply #3 on: November 25, 2016, 07:43 PM »
Use AutoHotkey to detect/capture whatever key combo you desire, and then simply pass/send the relevant trigger key(s) to KeyCounter, or, you could write a key-counting routine in AHK instead - but then, why reinvent an otherwise presumably perfectly good wheel?

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
Re: DONE: Key combination tally
« Reply #4 on: November 25, 2016, 07:45 PM »
Here's a quick'n'dirty AHK script to accomplish what you want.  It'll show the count in the window and the tray icon tooltip (hover the mouse cursor over the tray icon).  There's also a reset count option in the right-click menu of the tray icon.

Code: Autohotkey [Select]
  1. Menu, Tray, Add
  2. Menu, Tray, Add, Reset count, MenuHandler
  3. Gui, 1: Margin, 1, 1
  4. Gui, 1: +ToolWindow
  5. Gui, 1: +AlwaysOnTop
  6. Gui, 1: Add, Edit, w50 Center ReadOnly vedtCounter, 0
  7. Gui, 1: Show, , % " "
  8. Return
  9.  
  10.  
  11. UpdCounter:
  12. {
  13.     GuiControl, Text, edtCounter, % myCounter
  14.     Menu, Tray, Tip, % "Count: " . myCounter
  15. }
  16. Return
  17.  
  18.  
  19. MenuHandler:
  20. {
  21.     myCounter := 0
  22.     GoSub, UpdCounter
  23. }
  24. Return
  25.  
  26.  
  27. ~+Enter::
  28. {
  29.     myCounter++
  30.     GoSub, UpdCounter
  31. }
  32. Return

IainB

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 7,540
  • @Slartibartfarst
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: DONE: Key combination tally
« Reply #5 on: November 25, 2016, 07:48 PM »
Snap.
Sorry, I should have waited for @skwire to respond.    :-[

antekgla

  • Participant
  • Joined in 2011
  • *
  • Posts: 75
    • View Profile
    • SRTFilter
    • Donate to Member
Re: DONE: Key combination tally
« Reply #6 on: November 26, 2016, 06:46 AM »
Here's a quick'n'dirty AHK script to accomplish what you want.  It'll show the count in the window and the tray icon tooltip (hover the mouse cursor over the tray icon).  There's also a reset count option in the right-click menu of the tray icon.


 
So simple...
This drew my attention and I try to make something in Delphi... but try to monitor the keyboard in an application what dont have focus implies keyboard hooks, dlls, API Calls, Virtual Key Codes
This AHK script so simple... Don't have a SINGLE line of keyboard management, only the key combo searched...
Code: Autohotkey [Select]
  1. ~+Enter::
... and nothing more.

SRTFilter Automatic Subtitle Editor & Renamer
Dualcopy If you use Teracopy or Fastcopy this can be interesting   - My N.A.N.Y 2018 Entry
« Last Edit: November 26, 2016, 06:52 AM by antekgla »

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
Re: DONE: Key combination tally
« Reply #7 on: November 26, 2016, 08:05 PM »
Did the script work for your purposes?  If so, I'll mark this request as done.

ald4

  • Participant
  • Joined in 2009
  • *
  • Posts: 9
    • View Profile
    • Donate to Member
Re: DONE: Key combination tally
« Reply #8 on: November 27, 2016, 02:16 PM »
Many thanks!

It's quite a while since I used AHK. I'll need to redownload it and familiarise myself with it again.

ald4

  • Participant
  • Joined in 2009
  • *
  • Posts: 9
    • View Profile
    • Donate to Member
Re: DONE: Key combination tally
« Reply #9 on: November 28, 2016, 07:01 PM »
Did the script work for your purposes?  If so, I'll mark this request as done.

Script works great!  ;D