# Detecting control/command clicking

**URL:** <https://discourse.elm-lang.org/t/detecting-control-command-clicking/2175>\
**Category:** Learn\
**Created:** [October 10, 2018, 4:10am UTC](https://discourse.elm-lang.org/t/detecting-control-command-clicking/2175 "2018-10-10T04:10:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bandicoot](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/bandicoot/32/429_2.png) [@Bandicoot](https://discourse.elm-lang.org/u/Bandicoot)\
**Post date:** [October 10, 2018, 4:10am UTC](https://discourse.elm-lang.org/t/detecting-control-command-clicking/2175/1 "2018-10-10T04:10:18Z")

</div>

I’d like to differentiate between the normal clicking of a link in Elm 0.19, and the control-clicking (command-clicking in Mac OS) of that link. It doesn’t seem to be supported directly by `Browser.UrlRequest`; is there some other way?

---

<div class="post-metadata">

**Author:** ![mattpiz](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/mattpiz/32/860_2.png) [@mattpiz](https://discourse.elm-lang.org/u/mattpiz)\
**Post date:** [October 11, 2018, 4:09am UTC](https://discourse.elm-lang.org/t/detecting-control-command-clicking/2175/2 "2018-10-11T04:09:14Z")

</div>

I don’t know how `Browser.application` works, never used it yet. But if you decode the click events your self, you can [build a click event listener](https://package.elm-lang.org/packages/elm/html/latest/Html-Events#on) checking for the ctrl key (something like `Decode.field "ctrlKey" Decode.bool`).

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/elm_lang/original/1X/50a05e53677a2c3b47776d7abd0f113eb50193a1.png) [@system](https://discourse.elm-lang.org/u/system)\
**Post date:** [October 21, 2018, 4:09am UTC](https://discourse.elm-lang.org/t/detecting-control-command-clicking/2175/3 "2018-10-21T04:09:14Z")

</div>

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
