{"id":18980685,"url":"https://github.com/sublimetext/mouseeventlistener","last_synced_at":"2025-07-23T06:03:31.175Z","repository":{"id":3713609,"uuid":"4785551","full_name":"SublimeText/MouseEventListener","owner":"SublimeText","description":"Adds on_pre_click and on_post_click callbacks to Sublime Text's plugin API.","archived":false,"fork":false,"pushed_at":"2024-11-24T20:57:04.000Z","size":7,"stargazers_count":24,"open_issues_count":3,"forks_count":5,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-04-19T20:46:36.413Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SublimeText.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-06-25T18:29:31.000Z","updated_at":"2024-11-24T20:57:08.000Z","dependencies_parsed_at":"2025-03-22T01:31:04.726Z","dependency_job_id":"1d7953fd-9fba-4c7f-ae76-7a00517eceb1","html_url":"https://github.com/SublimeText/MouseEventListener","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SublimeText/MouseEventListener","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SublimeText%2FMouseEventListener","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SublimeText%2FMouseEventListener/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SublimeText%2FMouseEventListener/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SublimeText%2FMouseEventListener/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SublimeText","download_url":"https://codeload.github.com/SublimeText/MouseEventListener/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SublimeText%2FMouseEventListener/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266626115,"owners_count":23958344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T16:07:31.073Z","updated_at":"2025-07-23T06:03:31.148Z","avatar_url":"https://github.com/SublimeText.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"MouseEventListener\n======\n\n\u003e [!NOTE]\n\u003e Sublime Text build 4149 (stable: 4151, 2 August 2023)\n\u003e added support for the `context` key in mouse bindings.\n\u003e\n\u003e If you used or want to use this package\n\u003e for the purpose of emulating such a context query,\n\u003e you should use the native functionality instead.\n\nMouseEventListener adds two new callbacks to Sublime Text's plugin API:\n\n* `on_pre_click({'event': {'x': screen_x, 'y': screen_y, 'button': button}})`\n* `on_post_click(text_point)`\n\nAn important thing to note is that the selection is modified not once but twice in between `on_pre_mouse_down` and `on_post_mouse_down`—this is done to determine the `text_point` of the click, as Sublime Text 2 has no API to translate a screen x and y into a `text_point` other than by calling `drag_select` and seeing where the selection ends up.\n\nA second important thing to note is that mouse-up currently cannot be captured using Sublime Text 2's API. Hopefully this will be added in the future. However, this means that drags cannot be detected! other than perhaps by carefully monitoring the selection as it changes and just guessing. Additionally, `on_selection_modified` fires on mouse up in most cases.\n\nInstall\n-------\n\nThis plugin is available through Package Control, which is available here:\n\n    http://packagecontol.io/sublime_packages/package_control\n\nPackage Control does not support support dependency chains among packages,\nso if you depend on this package, \nyou have to mention installing it in your installation instructions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsublimetext%2Fmouseeventlistener","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsublimetext%2Fmouseeventlistener","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsublimetext%2Fmouseeventlistener/lists"}