Recent

Author Topic: [Solved] OnMouseDown - How catch gamer mouse keys  (Read 1034 times)

marcio2003

  • Jr. Member
  • **
  • Posts: 69
[Solved] OnMouseDown - How catch gamer mouse keys
« on: May 29, 2023, 12:14:41 pm »
Hi,
How can I change in runtime actions for the side keys (eg navigation keys) on the mouse?
It's not usual to see these functions used other apps except in browsers and games.
I'm some times making some apps for own use and i wanna add this functionality to my advantage.
Always, congratulations "Lazarus Team" for helping us,
Thank in advance for your attention.
« Last Edit: May 30, 2023, 08:41:49 pm by marcio2003 »
Lazarus 2.0.10 Windows 10 64bits

jamie

  • Hero Member
  • *****
  • Posts: 6077
The only true wisdom is knowing you know nothing

marcio2003

  • Jr. Member
  • **
  • Posts: 69
Re: OnMouseDown - How catch gamer mouse keys
« Reply #2 on: May 30, 2023, 08:26:20 pm »
Hey,
I remembered a simple solution:
In the OnMouseDown event I put
"DisplayMessage( ord( chr(button )));"
then i found the values for all my mouse keys.
I found Backward = 3 and Forward = 4.
But I really appreciate the links posted by Jamie for further learning.
  :D :D
Lazarus 2.0.10 Windows 10 64bits

marcio2003

  • Jr. Member
  • **
  • Posts: 69
Re: OnMouseDown - How catch gamer mouse keys
« Reply #3 on: May 30, 2023, 08:30:10 pm »
How can i change forum topic to solved?
Lazarus 2.0.10 Windows 10 64bits

jamie

  • Hero Member
  • *****
  • Posts: 6077
Re: OnMouseDown - How catch gamer mouse keys
« Reply #4 on: May 30, 2023, 08:37:31 pm »
log in.

edit/change your original post and edit the title. insert [Solved] etc.
The only true wisdom is knowing you know nothing

marcio2003

  • Jr. Member
  • **
  • Posts: 69
Re: [Solved] OnMouseDown - How catch gamer mouse keys
« Reply #5 on: May 30, 2023, 08:46:43 pm »
Please change
DisplayMessage( .. ) to ShowMessage( .. ).
DisplayMessage is a personal procedure.
Lazarus 2.0.10 Windows 10 64bits

marcio2003

  • Jr. Member
  • **
  • Posts: 69
Re: [Solved] OnMouseDown - How catch gamer mouse keys
« Reply #6 on: August 01, 2023, 11:58:41 am »
Hey guys,
I'm going to share with everyone a shortcut discovery for the code editor, we always use Ctrl+H or Ctrl+Shift+H to jump in the editor, but we can also use the mouse navigation buttons for this. Now that I've discovered this, it's easier and faster to do the jumps.
Greetings everyone
Lazarus 2.0.10 Windows 10 64bits

 

TinyPortal © 2005-2018