Bubble Docs
  • Introduction
  • New? Start Here
  • What is Bubble?
  • The Glossary
  • User manual
    • Getting started
      • What is Bubble?
      • Building for...
        • Web
        • Native iOS and Android
          • Mobile app quick start guide
          • What is a native mobile app?
          • Native mobile vs. web development
          • Differences in native and web elements
          • Native mobile app terminology
      • Building your first app
        • Planning features
        • Database structure
        • Design and UX
        • eCommerce and payments
          • Shopping cart
          • Checkout page
          • One-time payments
          • Subscriptions
          • Marketplace
      • Creating and managing apps
      • The Bubble editor
        • Tabs and sections
          • Design tab
            • The element tree
            • The property editor
          • Workflow tab
          • Data tab
          • Styles tab
          • Plugins tab
          • Settings tab
            • Application settings
              • Custom headers/body
              • Visual settings
              • Social media sharing
              • Translating your app
              • Email settings
              • Collaboration
            • Custom domain and DNS
          • Logs tab
        • Tools
          • Key features
          • The search tool
          • The Issue Checker
          • The element tree
          • The element property editor
          • The debugger
          • Notes
        • Previewing your app
      • Transitioning to Bubble from...
        • JavaScript
        • HTML and CSS
        • SQL
    • Design
      • Elements
        • Web app
          • The page
          • Containers
            • Groups
            • Repeating groups
            • Table elements
            • Popups
            • Floating groups
            • Group focus
          • Visual elements
          • Input forms
            • Text and numbers
            • Dates and time
            • File uploads
            • Selection controls
        • iOS and Android app
          • The view
          • Containers
          • Visual elements
          • Input forms
          • Mobile reusable elements
        • The element hierarchy
          • The element tree
        • Reusable Elements
      • Styling
        • Color variables
        • Font variables
        • Styles
        • Custom Fonts
      • Responsive design
        • Building responsive pages
        • Legacy articles
          • The Basics (Legacy)
          • Building Responsive Pages (Legacy)
          • Migrating Legacy Pages
          • Tips When Designing (Legacy)
      • Templates
      • The Component Library
      • Importing from Figma
    • Data
      • The database
        • Data types and fields
        • Creating, saving and deleting data
        • Finding data
        • Displaying data
        • Protecting data with privacy rules
        • The database editor
        • Export/import data
          • Exporting data
          • Importing data (CSV)
        • Working with location data
        • Using Algolia
        • Database structure by app type
          • Marketplace Apps
          • Directory & Listings Apps
          • Social Network Apps
          • SaaS Apps
          • Project Management Apps
          • CRM Apps
          • Professional Services Apps
          • On-demand Apps
          • Documentation/ CMS Apps
          • Applicant Tracking System (ATS) Apps
          • Portfolio Apps
          • Gallery Apps
          • Online Store / Ecommerce Apps
          • Blog Apps
          • Messaging App
          • Dashboards
          • Building Block Apps
          • Bubble as a backend
      • Files
      • Images
      • Static data
        • App texts (translations)
        • Option sets
      • Temporary data
        • Custom states
        • URL parameters
      • User accounts
        • Authentication plugins
          • Facebook plugin
          • Fitbit plugin
          • Google plugin
          • Instagram plugin
          • LinkedIn plugin
          • Pinterest plugin
          • Slack plugin
          • Wistia plugin
          • YouTube plugin
        • Cookies set by Bubble
      • Time, dates and time zones
    • Logic
      • The frontend and backend
      • Workflows
        • Events
          • Frontend events
            • Recurring workflows
            • Custom events
          • Backend events
            • Database trigger events
        • Actions
        • API Workflows
      • Dynamic expressions
      • Conditions
      • Navigation
        • Single-page applications (SPA)
        • Multi-page applications
        • Page slugs
      • Device resources
        • Location services
        • Camera/photo library
    • Workload
      • Understanding workload
        • Activity types
        • The workload calculation
        • Client-side and server-side processing
      • Tracking workload
        • Measuring
          • Using App Metrics
        • Monitoring
          • Workload notifications
          • Infinite recursion protection
      • Optimizing workload
        • Optimization framework
        • Optimization checklist
          • Page load
          • Searches
          • Workflows and actions
          • Backend workflows
        • Agency showcases
          • Minimum Studio
          • Neam
          • Support Dept
    • Security
      • Bubble's security features
      • Planning app security
      • Client-side and server-side
      • Bubble account security
      • App security
      • Page security
      • Database security
      • API security
        • API Connector security
        • Data API security
        • Workflow API security
      • Flusk
        • Overview
        • Flusk plan features
        • Getting started with Flusk
        • Flusk security tools
          • The Issues Explorer
          • Issue details
          • Tools and settings
            • Pages rating
            • Database rating
        • Flusk FAQ
      • Cookies
      • Security checklist
    • Previewing your app
      • Previewing a web app
      • Previewing a mobile app
    • Publishing your app
      • Web app
      • Native mobile app
        • Global native mobile settings
        • iOS App Store
        • Google Play Store
        • Publishing FAQ
    • AI
      • Generate apps with AI
        • About AI app generation
      • AI page designer
      • Connect to AI agents
    • Maintenance
      • Collaborators
      • Version control
        • Best practices: Version control
        • Transitioning from the legacy version control
        • Terminology: Version control
        • Version Control (legacy)
      • Commenting
      • Database maintenance
        • Copying the database
        • Restoring database backups
        • Bulk operations
          • Bulk operation methods compared
        • Wiping change history
      • Performance
        • Hard limits
        • Capacity Usage (legacy)
        • Notes on queries
      • SEO
        • Introduction to SEO
        • SEO: App
        • SEO: Page
      • Testing and debugging
        • Introduction to testing and debugging
        • The debugger
        • The server logs
        • Supported browsers
      • API workflow scheduler
    • Integrations
      • API
        • Introduction to APIs
          • What is a RESTful API?
        • The Bubble API
          • Bubble API terminology
          • Authentication
            • How to authenticate
            • No authentication
            • As a User
            • As an admin
          • The Data API
            • Data API Privacy Rules
            • Data API endpoints
            • Data API requests
          • The Workflow API
            • Workflow API privacy rules
            • Workflow API endpoints
            • API workflows
              • Creating API workflows
              • Scheduling API workflows
              • Recursive API workflows
              • API Workflow Scheduler
              • Case: Stripe notifications
        • The API Connector
          • Authentication
          • API Connector security
          • API guides
            • OpenAI
              • Authentication
              • Calls
                • ChatGPT
                  • Chat
            • Google Translate
              • How to setup Google API keys
          • Streaming API
        • API security
        • Plugins that connect to APIs
        • API Glossary
      • Plugins
        • What Plugins Can Do
        • Installing and using Plugins
        • Authentication plugins
        • Special Plugins
      • SQL Database Connector
      • Bubble App Connector
      • WorkOS
        • WorkOS SSO
        • WorkOS API
    • Infrastructure
      • Sub-apps
      • Bubble release tiers
      • Hosting and scaling
        • How Bubble hosting works
        • Scaling with Bubble
        • CDN (Cloudflare)
        • Bubble app names
        • Domain and DNS
      • Compliance
        • GDPR
        • SOC 2 Type II
        • HIPAA
        • Other frameworks and standards
    • Bubble for Enterprise
      • Hosting and infrastructure
        • Dedicated instance
          • The Dedicated editor experience
          • Technical specs
          • Main cluster dependencies
          • Customizable options
          • Migration process
            • Pre-migration
            • During migration
            • Post-migration
      • Security and compliance
        • Single sign-on (SSO)
        • GDPR
        • SOC 2 Type II
        • HIPAA
        • Other frameworks
        • Bubble's security features
      • Admin and collaboration
      • Priority support
      • Billing and Payment Guideline for Dedicated Instances
  • Core Reference
    • Using the core reference
    • Bubble's Interface
      • Design tab
      • Design tab (Legacy)
      • Workflow tab
      • Data tab
      • Styles tab
      • Styles tab (Legacy)
      • Plugins tab
      • Settings tab
      • Logs tab
      • Template tab
      • Toolbar
      • Top and context menu options
      • Deployment and version control
        • Deployment & Version Control Dropdown (legacy)
      • Notes
    • Elements
      • Native mobile elements
        • View element
        • List component
      • General properties
      • General properties (Legacy)
      • Styling properties
      • Styling Properties (Legacy)
      • Responsive Properties
      • Responsive Properties (Legacy)
      • Conditional formatting
      • States
      • Page Element
        • Page Element (Legacy)
      • Visual Elements
      • Containers
      • Container Layout Types
      • Containers (Legacy)
      • Input Forms
      • Reusable Elements
      • Element Templates (legacy)
    • Workflows
    • Events
      • General events
      • Element events
      • Custom events
      • Recurring event
      • Database trigger event
    • Actions
      • Account
      • Navigation
      • Data (things)
      • Email
      • Element
      • Custom
    • On-device resources
    • Data
      • Data Sources
      • Operators and comparisons
      • Search
      • Privacy
    • Styles
    • API
      • The Bubble API
        • The Data API
          • Authentication
          • Data API endpoints
          • Data API requests
        • The Workflow API
      • The API Connector
        • Authentication
        • Adding calls
    • Bubble-made Plugins
      • AddtoAny Share Buttons
      • Airtable
      • API Connector
      • Blockspring
      • Box
      • Braintree
      • Bubble App Connector
      • Chart.js
      • Circle Music Player
      • Draggable Elements
      • Dropzone
      • Facebook
      • Fitbit
      • Full Calendar
      • Google
      • Google Analytics
      • Google Optimize
      • Google Places
      • Ionic Elements
      • iTunes
      • Slidebar Menu
      • LinkedIn
      • Localize Translation
      • Mixpanel
      • Mouse & Keyboard Interactions
      • Multiselect Dropdown
      • Progress Bar
      • Rich Text Editor
      • Rich Text Editor (Legacy)
      • Screenshotlayer
      • SelectPDF
      • Slack
      • Segment
      • Slick Slideshow
      • SQL Database Connector
      • Star Rating
      • Stripe
      • Tinder-like Element
      • Twitter
      • YouTube
      • Zapier
    • Application Settings
      • App plan
      • General
      • Domain / email
      • Languages
      • SEO / metatags
      • API
      • Collaboration
      • Sub-apps
      • Versions
  • Account & Marketplace
    • Account and billing
      • Pricing and plans
        • Plans and billing
        • Billing cycle
        • FAQ: Pricing and Workload
      • Account Management
      • Building Apps for Others
      • Selling on the Marketplace
      • Plans & Billing (legacy)
    • Official Bubble Certification
      • Hiring certified developers
    • Building Plugins
      • The Plugin Editor
      • General Settings
      • Updating to Plugin API v4
      • Adding API Connections
      • Building Elements
      • Building Actions
      • Loading Data
      • Publishing and versioning
      • Github Integration
    • Building Templates
    • Application and data ownership
    • Marketplace policies
    • Bug reports
  • Vulnerability Disclosure Policy
  • Beta features
    • About the Beta features section
    • Native mobile apps
Powered by GitBook
On this page
  • Installation
  • Data source: Get mouse data
  • Get mouse data’s X position
  • Get mouse data’s Y position
  • Get mouse data’s right mouse clicked down
  • Get mouse data’s right mouse click released
  • Get mouse data’s left mouse clicked down
  • Get mouse data’s left mouse click released
  • Event: Mouse is clicked down
  • Click side
  • Prevent default
  • Event: User scrolls on page
  • Scroll direction
  • Trigger
  • Prevent default
  • An element is hovered
  • Element
  • An element stops being hovered
  • Element
  • User presses a key or combination of keys
  • Keyboard shortcut
  • Disable when input is focused
  • Action: Reposition
  • X position
  • Y position

Was this helpful?

  1. Core Reference
  2. Bubble-made Plugins

Mouse & Keyboard Interactions

Last updated 3 years ago

Was this helpful?

This is a highly experimental feature - we built this plugin with its collection of advanced features because we like to think about how we can push the frontiers of what Bubble apps are capable of. While we believe the functionality generally works at the time of launch, we explicitly do not guarantee that we will fix bugs or build follow-on features relating to this plugin. That means you should be cautious before over-relying on any of these features, but we hope you have fun and we’d love to hear about how you use these features! (For more information / discussion on this plugin, see the .)

The Mouse & Keyboard Interactions plugin contains a number of more advanced features that let you customize the keyboard and mouse interactions on your app.

Installation

You can find the Mouse & Keyboard Interactions plugin in the plugin gallery. It’s free to install and there are no configuration settings at the plugin level.

Data source: Get mouse data

This is a new data source that’s an option in the data source dropdown in a dynamic statement. It gives access to the following operators:

Get mouse data’s X position

This is the mouse’s X (horizontal) position on the page, where the left side of the window is 0.

Note: Using this in conditionals (”Only when...”) on certain workflow actions may not work; try using this as the conditional on the event instead.

Get mouse data’s Y position

This is the mouse’s Y (vertical) position on the page, where the top of the window is 0.

Note: Using this in conditionals (”Only when...”) on certain workflow actions may not work; try using this as the conditional on the event instead.

Get mouse data’s right mouse clicked down

This is a yes/no value that starts off “no” when the page is loaded and becomes “yes” when the right mouse button is clicked down. It should flip back to “no” when the right mouse click is released.

Get mouse data’s right mouse click released

This is a yes/no value that starts off “no” when the page is loaded and becomes “yes” when the right mouse was clicked but has since been released. It stays “yes” until the next time the right mouse button is clicked down, at which point it flips to “no”.

Note: This will only work reliably if there’s a right-click workflow event on the page that has the default prevented.

Get mouse data’s left mouse clicked down

This is a yes/no value that starts off “no” when the page is loaded and becomes “yes” when the left mouse button is clicked down. It should flip back to “no” when the left mouse click is released.

Get mouse data’s left mouse click released

This is a yes/no value that starts off “no” when the page is loaded and becomes “yes” when the left mouse was clicked but has since been released. It stays “yes” until the next time the left mouse button is clicked down, at which point it flips to “no”.

Event: Mouse is clicked down

This event, found in the new events category “Interactions”, fires when a mouse button is clicked.

Click side

This event can respond to the left, middle or right buttons on the mouse.

Prevent default

If this event is triggered by the right mouse button, there is the option to prevent the default right-click behavior, which usually brings up the browser’s / system’s right-click menu.

Tip: Clicks on elements like buttons will also trigger this workflow

Note: If an event on the page is a right-click event that has the default prevented, then all right-clicks on the page will have their defaults prevents even if there’s an “Only when” statement on the event that isn’t satisfied.

Note: Clicks on an Apple Magic Mouse may not produce the desired effect.

Event: User scrolls on page

This event, found in the new events category “Interactions”, fires when a user scrolls on the page using a mouse wheel. This is explicitly not when a user manually move the page’s scrollbar up or down, but this means that this event can trigger on a mouse wheel scroll even on a page that’s not long enough to need a scrollbar.

Scroll direction

Choice of when the user scrolls up, down or in either direction

Trigger

This event can trigger either when the user begins their scroll or ends their scroll

Prevent default

If checked, the mouse wheel scroll will not actually scroll the page for the user, but will still run this workflow.

Tip: If you use this action in conjunction with the mouse’s X / Y positions, it will get a bit confusing whether the X / Y refers to before or after the scroll, so consider using the “prevent default” toggle.

An element is hovered

This event, found in the events category “Elements”, fires when the user’s mouse begins to hover over the specified element.

Element

This is the element on the page that, when hovered, will initiate this workflow.

An element stops being hovered

This event, found in the events category “Elements”, fires when the user’s mouse stops hovering over the specified element.

Element

This is the element on the page that, when it stops being hovered, will initiate this workflow.

User presses a key or combination of keys

This event, found in the new events category “Interactions”, lets you create custom keyboard shortcuts for your apps. See below for which keyboard shortcuts are supported.

Keyboard shortcut

The combination of keys that when pressed, fires this workflow. Note that when you are focused on this field, it detects which key combination you are pressing, and you cannot manually edit the combo it detects.

These combos are supported:

  • A shortcut can have multiple of these keys together (often called modifier keys): Shift, Control, Option (Mac) / Alt (Windows), and Command (Mac) / Windows (Windows)

  • A shortcut can only ever have at most 1 of these keys: letters on an English keyboard, digits, tab, caps lock, a directional arrow, backspace, escape, page down / page up, F1-10, F12, + (via numpad), the symbols ` - = [ ] \ ; ‘ , /

  • These keys explicitly will not work: F11, Fn, Enter

  • Any special modifier key not in the list above will probably not work

  • Many keyboard shortcuts (especially ones with the Windows key) are reserved by the operating system and cannot be overwritten

  • Non-English keyboards will have special characters that generally do not work with this feature

Note: If you want to rely on a custom shortcut key, be sure to test it out on both Mac and Windows (and other operating systems if you expect your users to use them). Generally speaking, Option on a Mac corresponds to Alt on Windows, and Command on a Mac corresponds to Windows on Windows. But, there can be exceptions to this rule, and the two operating systems definitely have slightly different sets of reserved shortcuts.

If in doubt, your best bet is to test any potential shortcut out on different operating systems.

Disable when input is focused

Lets you choose whether this custom keyboard shortcut should work when the user is focused in an input field

Action: Reposition

This action, found in the “Plugins” category, will reposition an element on the page. This only works for popups, floating groups, alerts and group focuses.

Note: Be careful when creating workflows that have different actions that might trigger together when using these interaction features, because certain combinations can confuse Bubble. For example, if you have a workflow event for clicking on a button that shows an alert and a second workflow event for a left mouse click that repositions the same alert, in a situation where both workflows should fire, Bubble will not know which to fire first. One workaround is to combine the actions into just one workflow.

X position

The X (horizontal) coordinate on the page that the top-left corner of the element will move to, where the left side of the window is 0.

Y position

The Y (vertical) coordinate on the page that the top-left corner of the element will move to, where the top of the window is 0.

forum announcement