# \[ANN\] Mousetrap, the new Julia GUI Engine, now supports GLMakie & macOS

**URL:** <https://discourse.julialang.org/t/ann-mousetrap-the-new-julia-gui-engine-now-supports-glmakie-macos/105252>\
**Category:** Package Announcements\
**Tags:** package, announcement\
**Created:** [October 20, 2023, 9:27pm UTC](https://discourse.julialang.org/t/ann-mousetrap-the-new-julia-gui-engine-now-supports-glmakie-macos/105252 "2023-10-20T21:27:11Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Clemapfel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/clemapfel/32/32261_2.png) [@Clemapfel](https://discourse.julialang.org/u/Clemapfel)\
**Post date:** [October 20, 2023, 9:27pm UTC](https://discourse.julialang.org/t/ann-mousetrap-the-new-julia-gui-engine-now-supports-glmakie-macos/105252/1 "2023-10-20T21:27:11Z")

</div>

## Available here: [https://github.com/Clemapfel/Mousetrap.jl](https://github.com/Clemapfel/Mousetrap.jl)

* * *

Mousetrap, a GUI engine designed for Julia, just released [version 0.3.0](https://github.com/Clemapfel/Mousetrap.jl/releases/tag/v0.3.0).

This version makes Mousetrap **fully portable** , meaning it will now run on any 64-bit desktop operating system - without caveats.

It furthermore added a [new feature](https://clemens-cords.com/mousetrap/01_manual/12_opengl_integration/) that allows any OpenGL-based library to render to a Mousetrap widget. This was used to implement a (still experimental) GLMakie interface, such that **Makie plots can now be displayed inside a Mousetrap application** , just like any other widget.

If you were unsure about Mousetrap.jl due to stability, portability, and missing Makie integration, v0.3.0 addressed these concerns and hopes to aid in long-term adoption.

If you are knowledgeable about Makie, consider participating in the development of [MousetrapMakie.jl](https://github.com/Clemapfel/MousetrapMakie.jl), a newly created package that strives to make Makie integration seamless and fully featured.

Thank you for your consideration,  
C. Cords

* * *

PS: See [here](https://github.com/clemapfel/mousetrap.jl#installation) for how to install Mousetrap. We are still waiting on pull requests with Yggdrasil and the Julia registry being merged, meaning `add Mousetrap` does not yet work, though it will soon.

---

<div class="post-metadata">

**Author:** ![brianguenter](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brianguenter/32/29519_2.png) [@brianguenter](https://discourse.julialang.org/u/brianguenter)\
**Post date:** [October 22, 2023, 9:21pm UTC](https://discourse.julialang.org/t/ann-mousetrap-the-new-julia-gui-engine-now-supports-glmakie-macos/105252/2 "2023-10-22T21:21:29Z")

</div>

This looks cool. Thank you for your contribution.

There are a few other tools that seem to have similar functionality and it’s difficult for me to figure which one to use without investing a lot of time playing around with them all.

If I was to choose between Mousetrap and QML.jl (which looks similar) what are the pros and cons of each? Does QML.jl lack the Makie rendering capability?

Are there other Julia GUI engines that are similar to Mousetrap?

---

<div class="post-metadata">

**Author:** ![togo59](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/togo59/32/4138_2.png) [@togo59](https://discourse.julialang.org/u/togo59)\
**Post date:** [October 25, 2023, 5:48pm UTC](https://discourse.julialang.org/t/ann-mousetrap-the-new-julia-gui-engine-now-supports-glmakie-macos/105252/3 "2023-10-25T17:48:42Z")

</div>

Fantastic manual/documentation BTW 🙂

---

<div class="post-metadata">

**Author:** ![ParadaCarleton](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/paradacarleton/32/20005_2.png) [@ParadaCarleton](https://discourse.julialang.org/u/ParadaCarleton)\
**Post date:** [November 19, 2023, 9:27pm UTC](https://discourse.julialang.org/t/ann-mousetrap-the-new-julia-gui-engine-now-supports-glmakie-macos/105252/4 "2023-11-19T21:27:37Z")

</div>

This is incredible, and I just wanted to thank you for all your hard work on this. 😄

---

<div class="post-metadata">

**Author:** ![Benny](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@Benny](https://discourse.julialang.org/u/Benny)\
**Post date:** [November 29, 2023, 3:17pm UTC](https://discourse.julialang.org/t/ann-mousetrap-the-new-julia-gui-engine-now-supports-glmakie-macos/105252/5 "2023-11-29T15:17:32Z")

</div>

I’m reading through [the documentation](https://clemens-cords.com/mousetrap/01_manual/05_event_handling) for touch events, and while there are some multitouch events like pinch-zoom, rotate, and swipe, I was wondering if this can support simultaneous independent touches, each a simple press\>possible move\>release; an example off the top of my head is how multiple fingers on some drawing apps like Paint can independently draw different things per touch. I had considered if mouse button events can be repurposed for this, but “touchscreen ‘taps’ will be registered as if the left mouse button was pressed” seems to imply there can only be one such touch at a time.

---

<div class="post-metadata">

**Author:** ![bcon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bcon/32/23495_2.png) [@bcon](https://discourse.julialang.org/u/bcon)\
**Post date:** [November 29, 2023, 4:09pm UTC](https://discourse.julialang.org/t/ann-mousetrap-the-new-julia-gui-engine-now-supports-glmakie-macos/105252/6 "2023-11-29T16:09:12Z")

</div>

Looks cool, I’m looking forward to giving it a try.  
I too would like comments contrasting this to other packages. It may be that there are no other packages working on guis…but I’m pretty sure I’ve heard of [several](https://discourse.julialang.org/t/anyone-crazy-enough-to-develop-a-pure-julia-gui-toolbox/74002). I understand the polite desire to refrain from critiquing other packages, but the earlier that architecture differences are [made known](https://github.com/mechanomy/UnitTypes.jl#comparison-with-other-packages), the sooner their implications can be considered and resourced correctly.

---

<div class="post-metadata">

**Author:** ![SergeantMike](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sergeantmike/32/202613_2.png) [@SergeantMike](https://discourse.julialang.org/u/SergeantMike)\
**Post date:** [November 29, 2023, 4:28pm UTC](https://discourse.julialang.org/t/ann-mousetrap-the-new-julia-gui-engine-now-supports-glmakie-macos/105252/7 "2023-11-29T16:28:53Z")

</div>

Is it available only through URL or has it been added to the Julia package registry?

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [November 29, 2023, 4:39pm UTC](https://discourse.julialang.org/t/ann-mousetrap-the-new-julia-gui-engine-now-supports-glmakie-macos/105252/8 "2023-11-29T16:39:55Z")

</div>

The documentation says:

```julia
import Pkg;
begin
    Pkg.add(url="https://github.com/clemapfel/mousetrap.jl")
    Pkg.test("Mousetrap")
end

```

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [November 29, 2023, 6:52pm UTC](https://discourse.julialang.org/t/ann-mousetrap-the-new-julia-gui-engine-now-supports-glmakie-macos/105252/9 "2023-11-29T18:52:49Z")

</div>

This paragraph from this package docs is worth highlighting:

_Heavy editorializing has taken place, renaming or completely removing certain parts of GTK4 in an effort to make mousetrap more friendly to newcomers and people with no GUI experience, easier to use, and less susceptible to developer error._

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [December 1, 2023, 10:21pm UTC](https://discourse.julialang.org/t/ann-mousetrap-the-new-julia-gui-engine-now-supports-glmakie-macos/105252/10 "2023-12-01T22:21:17Z")

</div>

Hi @Clemapfel, how can we produce a scrollable Tree View using Mousetrap.jl, as in this [Gtk.jl example](https://discourse.julialang.org/t/listview-grouping-popup-window-examples/96092/7)?

Thanks.

---

<div class="post-metadata">

**Author:** ![H-man](https://avatars.discourse-cdn.com/v4/letter/h/ac91a4/32.png) [@H-man](https://discourse.julialang.org/u/H-man)\
**Post date:** [May 23, 2025, 10:39am UTC](https://discourse.julialang.org/t/ann-mousetrap-the-new-julia-gui-engine-now-supports-glmakie-macos/105252/11 "2025-05-23T10:39:09Z")

</div>

I just wanted to say good job, you have created a wonderful package with easy to follow documentation. I had two questions:

1. I was wondering if you have any updates on mousetrap?

2. I really want to start using it, however it seems that mousetrap does’nt work with julia 1.11, can anyone help me?

---

<div class="post-metadata">

**Author:** ![Eben60](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/eben60/32/13475_2.png) [@Eben60](https://discourse.julialang.org/u/Eben60)\
**Post date:** [May 23, 2025, 3:14pm UTC](https://discourse.julialang.org/t/ann-mousetrap-the-new-julia-gui-engine-now-supports-glmakie-macos/105252/12 "2025-05-23T15:14:59Z")

</div>

A note on the GitHub says

> **Note** : February 8th, 2024: I’ve been having some health issues at the moment, it may take me some time to get to open issues. Mousetrap is still usable and (mostly) stable, the repo will be maintained in the immediate future to the best of my abilities. Thank you for your understanding, C.

The author of Mousetrap is currently commiting actively in their next project, which is in Lua. `Mousetrap` as well as `jluna` appear to be abandoned, and the author doesn’t respond to GitHub issues. It is really pity about the wasted effort: One is probably not going to build anything on such a foundation.

---

<div class="post-metadata">

**Author:** ![xgdgsc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xgdgsc/32/608_2.png) [@xgdgsc](https://discourse.julialang.org/u/xgdgsc)\
**Post date:** [May 24, 2025, 2:30am UTC](https://discourse.julialang.org/t/ann-mousetrap-the-new-julia-gui-engine-now-supports-glmakie-macos/105252/13 "2025-05-24T02:30:49Z")

</div>

[No longer works on 1.11 · Issue #87 · Clemapfel/Mousetrap.jl · GitHub](https://github.com/Clemapfel/Mousetrap.jl/issues/87#issuecomment-2581094639) Try this fork?

---

<div class="post-metadata">

**Author:** ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)\
**Post date:** [May 26, 2025, 5:16pm UTC](https://discourse.julialang.org/t/ann-mousetrap-the-new-julia-gui-engine-now-supports-glmakie-macos/105252/14 "2025-05-26T17:16:20Z")

</div>

I could install in 1.11 on Linux but not run (seemingly can work, and on Windows, see below):

```julia
(pharaldsson) pkg> st
Status `~/Project.toml`
  [ac6e5ff7] JuliaSyntaxHighlighting v0.1.0
  [5deeb4b9] Mousetrap v0.3.3 `https://github.com/HyperSphereStudio/Mousetrap.jl#main`
  [287f9a42] libmousetrap_jll v0.3.0+0 `https://github.com/Clemapfel/mousetrap_jll#main`

julia> using Mousetrap
Precompiling Mousetrap...
Info Given Mousetrap was explicitly requested, output will be shown live 
ERROR: LoadError: InitError: could not load library "/home/pharaldsson/.julia/artifacts/b292ae2e313d5ab559c9838dfb8390f192b4f3b8/lib/libmousetrap_julia_binding.so"
libjulia.so.1: cannot open shared object file: No such file or directory

```

What might work for others is this fork, note different name with lib in front (but not for me since it’s not build for Linux only Windows, should be fixable):

```julia
(pharaldsson) pkg> add https://github.com/HyperSphereStudio/libmousetrap_jll
    Updating git-repo `https://github.com/HyperSphereStudio/libmousetrap_jll`
   Resolving package versions...
    Updating `~/Project.toml`
  [287f9a42] ~ libmousetrap_jll v0.3.0+0 `https://github.com/Clemapfel/mousetrap_jll#main` ⇒ v0.4.8+0 `https://github.com/HyperSphereStudio/libmousetrap_jll#main`
    Updating `~/Manifest.toml`
  [287f9a42] ~ libmousetrap_jll v0.3.0+0 `https://github.com/Clemapfel/mousetrap_jll#main` ⇒ v0.4.8+0 `https://github.com/HyperSphereStudio/libmousetrap_jll#main`
Precompiling project...
  ✗ Mousetrap
  1 dependency successfully precompiled in 5 seconds. 177 already precompiled.
  1 dependency errored.
  For a report of the errors see `julia> err`. To retry use `pkg> precompile`

julia> err
PkgPrecompileError: The following 1 direct dependency failed to precompile:

Mousetrap 

Failed to precompile Mousetrap [5deeb4b9-6e04-4da7-8b7f-c77fb1eae65e] to "/home/pharaldsson/.julia/compiled/v1.11/Mousetrap/jl_ckrovz".
ERROR: LoadError: UndefVarError: `mousetrap_julia_binding` not defined in `libmousetrap_jll`

```

> **[Build software better, together](https://github.com/search?q=repo%3AHyperSphereStudio%2Flibmousetrap_jll%2Blibmousetrap_julia&type=code)**
>
> GitHub is where people build software. More than 150 million people use GitHub to discover, fork, and contribute to over 420 million projects.

> [src/wrappers/x86\_64-w64-mingw32-julia\_version+1.11.jl](https://github.com/HyperSphereStudio/libmousetrap_jll/blob/583549a2fb40b25a02f8903d27e3a68889c9d819/src/wrappers/x86_64-w64-mingw32-julia_version%2B1.11.jl#L11)  
> ..  
> “bin\libmousetrap\_julia\_binding-0.dll”,

> [@In 1.11 and 1.10: ERROR: expected package \`JuliaSyntaxHighlighting \[dc6e5ff7\]\` to be registered](https://discourse.julialang.org/t/in-1-11-and-1-10-error-expected-package-juliasyntaxhighlighting-dc6e5ff7-to-be-registered/122555):
>
> What is it about? I removed my ./Project.toml file just in case, then: $ julia +1.11 --project=. julia\> using JSON .. Resolving package versions... ERROR: expected package `JuliaSyntaxHighlighting [dc6e5ff7]` to be registered also when adding it directly: pkg\> add JuliaSyntaxHighlighting Resolving package versions... ERROR: expected package `JuliaSyntaxHighlighting [dc6e5ff7]` to be registered I find old workaround (do not remove .julia, then at least move it): I was able to solve …

This should work (maybe it does for you, ~~I forget the reason for this error~~ ), in 1.11.5:

I fixed old error by [re]moving Manifest.toml file:

```julia
julia --project=.

(pharaldsson) pkg> add https://github.com/HyperSphereStudio/Mousetrap.jl
    Updating git-repo `https://github.com/HyperSphereStudio/Mousetrap.jl`
   Resolving package versions...
ERROR: expected package `JuliaSyntaxHighlighting [dc6e5ff7]` to be registered

```

In my current env for 1.10.5 I’m currently testing:

```julia
(pharaldsson) pkg> add https://github.com/HyperSphereStudio/Mousetrap.jl
    Updating git-repo `https://github.com/HyperSphereStudio/Mousetrap.jl`
   Resolving package versions...
ERROR: expected package `JuliaSyntaxHighlighting [dc6e5ff7]` to be registered
(@v1.10) pkg> add https://github.com/HyperSphereStudio/Mousetrap.jl
    Updating git-repo `https://github.com/HyperSphereStudio/Mousetrap.jl`
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package libmousetrap_jll [287f9a42]:
 libmousetrap_jll [287f9a42] log:
 ├─libmousetrap_jll [287f9a42] has no known versions!
 └─restricted to versions * by Mousetrap [5deeb4b9] — no versions left
   └─Mousetrap [5deeb4b9] log:
     ├─possible versions are: 0.3.3 or uninstalled
     └─Mousetrap [5deeb4b9] is fixed to version 0.3.3

(@v1.10) pkg> add https://github.com/HyperSphereStudio/libmousetrap_jll
     Cloning git-repo `https://github.com/HyperSphereStudio/libmousetrap_jll`
    Updating git-repo `https://github.com/HyperSphereStudio/libmousetrap_jll`
   Resolving package versions...
    Updating `~/.julia/environments/v1.10/Project.toml`
  [287f9a42] + libmousetrap_jll v0.4.8+0 `https://github.com/HyperSphereStudio/libmousetrap_jll#main`
    Updating `~/.julia/environments/v1.10/Manifest.toml`
  [bde7f898] + GLEW_jll v2.2.0+0
  [bd17208b] + GLU_jll v9.0.1+0
  [cc7be9be] + OpenGLMathematics_jll v0.9.9+0
  [583852a3] + libadwaita_jll v1.3.6+0
  [287f9a42] + libmousetrap_jll v0.4.8+0 `https://github.com/HyperSphereStudio/libmousetrap_jll#main`
  [05823500] ↑ OpenLibm_jll v0.8.1+2 ⇒ v0.8.1+4
Precompiling packages [=========================>] 400/664
  ✗ Cxx
  ◑ JuliaFormatter
  ◐ TiffImages
  ◐ Polynomials

```

> [@In 1.11 and 1.10: ERROR: expected package \`JuliaSyntaxHighlighting \[dc6e5ff7\]\` to be registered](https://discourse.julialang.org/t/in-1-11-and-1-10-error-expected-package-juliasyntaxhighlighting-dc6e5ff7-to-be-registered/122555):
>
> What is it about? I removed my ./Project.toml file just in case, then: $ julia +1.11 --project=. julia\> using JSON .. Resolving package versions... ERROR: expected package `JuliaSyntaxHighlighting [dc6e5ff7]` to be registered also when adding it directly: pkg\> add JuliaSyntaxHighlighting Resolving package versions... ERROR: expected package `JuliaSyntaxHighlighting [dc6e5ff7]` to be registered I find old workaround (do not remove .julia, then at least move it): I was able to solve …

```julia
julia> Pkg.add(PackageSpec(url="https://github.com/JuliaLang/JuliaSyntaxHighlighting.jl", rev="dc6e5ff7"))
    Updating git-repo `https://github.com/JuliaLang/JuliaSyntaxHighlighting.jl`
ERROR: Did not find rev dc6e5ff7 in repository

julia> Pkg.add(PackageSpec(url="https://github.com/JuliaLang/JuliaSyntaxHighlighting.jl", rev="b666d3c"))
   Resolving package versions...
ERROR: expected package `JuliaSyntaxHighlighting [dc6e5ff7]` to be registered

```
