Skip to content

Allow to configure and report key modifiers in TapTool and pointer events#13132

Merged
mattpap merged 10 commits into
branch-3.2from
mattpap/12532_TapTool_modifiers
May 23, 2023
Merged

Allow to configure and report key modifiers in TapTool and pointer events#13132
mattpap merged 10 commits into
branch-3.2from
mattpap/12532_TapTool_modifiers

Conversation

@mattpap

@mattpap mattpap commented May 16, 2023

Copy link
Copy Markdown
Contributor

This adds two things:

  • Allows to configure TapTool with key modifiers required to trigger the tool. This is specifically useful in inspect mode, less in select mode, which has intrinsic meaning for key modifiers, derived from other select tools.
  • Allows to report key modifiers in TapTool's callback data and allows the same for pointer events Tap, etc.

fixes #12532

@mattpap mattpap added this to the 3.2 milestone May 16, 2023
@codecov

codecov Bot commented May 16, 2023

Copy link
Copy Markdown

Codecov Report

Merging #13132 (2bb4d76) into branch-3.2 (6bec5c2) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           branch-3.2   #13132   +/-   ##
===========================================
  Coverage       92.41%   92.41%           
===========================================
  Files             315      315           
  Lines           20029    20038    +9     
===========================================
+ Hits            18509    18518    +9     
  Misses           1520     1520           

@mattpap
mattpap force-pushed the mattpap/12532_TapTool_modifiers branch from b6b30af to 1cda558 Compare May 21, 2023 12:01
@mattpap
mattpap force-pushed the mattpap/12532_TapTool_modifiers branch from 1cda558 to a7a62e9 Compare May 21, 2023 12:25

@bryevdv bryevdv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM modulo two small suggestions

Comment thread src/bokeh/models/tools.py Outdated
Comment thread examples/interaction/tools/tap_inspect.py
@mattpap
mattpap force-pushed the mattpap/12532_TapTool_modifiers branch from a7a62e9 to 2bb4d76 Compare May 23, 2023 19:43
@mattpap
mattpap merged commit d4e1e91 into branch-3.2 May 23, 2023
@mattpap
mattpap deleted the mattpap/12532_TapTool_modifiers branch May 23, 2023 21:28
@nlosacco

nlosacco commented Sep 6, 2023

Copy link
Copy Markdown

but this still only allows for a single action per each TapTool, right?
I mean, it's not possible to set up different actions for different modifiers with a single TapTool, is it?

Chiemezuo pushed a commit to Chiemezuo/bokeh that referenced this pull request Aug 27, 2024
…events (bokeh#13132)

* Allow to configure key modifiers in TapTool

* Refactor callback emit in TapTool

* Expose key modifiers to the callback in inspect mode

* Expose key modifiers to pointer events

* Add an example of inspect setup of TapTool

* Unify handling of key modifiers across bokehjs

* Add unit tests for setting modifiers and reporting

* Added a release note

* Rename tap_inspect.py -> tap_inspect_keymod.py

* Change a note to a warning
@github-actions

Copy link
Copy Markdown

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Oct 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Access to know whether user ctrl-clicks, shift-clicks, or command-clicks in CustomJS callback

3 participants