Behavior Research Methods

, Volume 49, Issue 5, pp 1652–1667 | Cite as

Mousetrap: An integrated, open-source mouse-tracking package



Mouse-tracking – the analysis of mouse movements in computerized experiments – is becoming increasingly popular in the cognitive sciences. Mouse movements are taken as an indicator of commitment to or conflict between choice options during the decision process. Using mouse-tracking, researchers have gained insight into the temporal development of cognitive processes across a growing number of psychological domains. In the current article, we present software that offers easy and convenient means of recording and analyzing mouse movements in computerized laboratory experiments. In particular, we introduce and demonstrate the mousetrap plugin that adds mouse-tracking to OpenSesame, a popular general-purpose graphical experiment builder. By integrating with this existing experimental software, mousetrap allows for the creation of mouse-tracking studies through a graphical interface, without requiring programming skills. Thus, researchers can benefit from the core features of a validated software package and the many extensions available for it (e.g., the integration with auxiliary hardware such as eye-tracking, or the support of interactive experiments). In addition, the recorded data can be imported directly into the statistical programming language R using the mousetrap package, which greatly facilitates analysis. Mousetrap is cross-platform, open-source and available free of charge from


Mouse-tracking Experimental design Software Response dynamics Process tracing OpenSesame Python 



We thank Anja Humbs for testing a development version of the mousetrap plugin for OpenSesame, Monika Wiegelmann and Mila Rüdiger for collecting the data for the example experiment, and Arndt Bröder and Johanna Hepp for helpful comments on an earlier version of this manuscript. This work was supported by the University of Mannheim’s Graduate School of Economic and Social Sciences funded by the German Research Foundation


  1. Awasthi, B., Friedman, J., & Williams, M. A. (2011). Faster, stronger, lateralized: Low spatial frequency information supports face processing. Neuropsychologia, 49(13), 3583–3590. doi: 10.1016/j.neuropsychologia.2011.08.027 CrossRefPubMedGoogle Scholar
  2. Buc Calderon, C., Verguts, T., & Gevers, W. (2015). Losing the boundary: Cognition biases action well after action selection. Journal of Experimental Psychology: General, 144(4), 737–743. doi: 10.1037/xge0000087 CrossRefGoogle Scholar
  3. Dale, R., Kehoe, C., & Spivey, M. J. (2007). Graded motor responses in the time course of categorizing atypical exemplars. Memory & Cognition, 35(1), 15–28. doi: 10.3758/BF03195938 CrossRefGoogle Scholar
  4. Dale, R., Roche, J., Snyder, K., & McCall, R. (2008). Exploring action dynamics as an index of paired-associate learning. PLOS ONE, 3(3), e1728. doi: 10.1371/journal.pone.0001728
  5. Dalmaijer, E. S., Mathôt, S., & Van der Stigchel, S. (2014). PyGaze: An open-source, cross-platform toolbox for minimal-effort programming of eyetracking experiments. Behavior Research Methods, 46(4), 913–921. doi: 10.3758/s13428-013-0422-2
  6. Dshemuchadse, M., Scherbaum, S., & Goschke, T. (2013). How decisions emerge: Action dynamics in intertemporal decision making. Journal of Experimental Psychology: General, 142(1), 93–100. doi: 10.1037/a0028499 CrossRefGoogle Scholar
  7. Fischer, M. H., & Hartmann, M. (2014). Pushing forward in embodied cognition: May we mouse the mathematical mind? Frontiers in Psychology, 5, 1315. doi: 10.3389/fpsyg.2014.01315 PubMedPubMedCentralGoogle Scholar
  8. Freeman, J. B., & Ambady, N. (2010). MouseTracker: Software for studying real-time mental processing using a computer mouse-tracking method. Behavior Research Methods, 42(1), 226–241. doi: 10.3758/BRM.42.1.226 CrossRefPubMedGoogle Scholar
  9. Freeman, J. B., & Dale, R. (2013). Assessing bimodality to detect the presence of a dual cognitive process. Behavior Research Methods, 45(1), 83–97. doi: 10.3758/s13428-012-0225-x CrossRefPubMedGoogle Scholar
  10. Freeman, J. B., Dale, R., & Farmer, T. A. (2011). Hand in motion reveals mind in motion. Frontiers in Psychology, 2, 59. doi: 10.3389/fpsyg.2011.00059 CrossRefPubMedPubMedCentralGoogle Scholar
  11. Frisch, S., Dshemuchadse, M., Görner, M., Goschke, T., & Scherbaum, S. (2015). Unraveling the sub-processes of selective attention: Insights from dynamic modeling and continuous behavior. Cognitive Processing, 16(4), 377–388. doi: 10.1007/s10339-015-0666-0 CrossRefPubMedGoogle Scholar
  12. Haslbeck, J. M. B., Wulff, D. U., Kieslich, P. J., Henninger, F., & Schulte-Mecklenbeck, M. (2017). Advanced mouse- and hand-tracking analysis: Detecting and visualizing clusters in movement trajectories. Manuscript in preparation.Google Scholar
  13. Hehman, E., Stolier, R. M., & Freeman, J. B. (2015). Advanced mouse-tracking analytic techniques for enhancing psychological science. Group Processes & Intergroup Relations, 18(3), 384–401. doi: 10.1177/1368430214538325 CrossRefGoogle Scholar
  14. Henninger, F. (2017). The participant on a chip: Flexible, low-cost, high-precision validation of experimental software. Manuscript in preparation.Google Scholar
  15. Henninger, F., Kieslich, P. J., & Hilbig, B. E. (in press). Psynteract: A flexible, cross-platform, open framework for interactive experiments. Behavior Research Methods. doi: 10.3758/s13428-016-0801-6
  16. Kieslich, P. J., & Henninger, F. (2016). Readbulk: An R package for reading and combining multiple data files. doi: 10.5281/zenodo.596649
  17. Kieslich, P. J., & Hilbig, B. E. (2014). Cognitive conflict in social dilemmas: An analysis of response dynamics. Judgment and Decision Making, 9(6), 510–522.Google Scholar
  18. Kieslich, P. J., Wulff, D. U., Henninger, F., Haslbeck, J. M. B., & Schulte-Mecklenbeck, M. (2016). Mousetrap: An R package for processing and analyzing mouse-tracking data. doi: 10.5281/zenodo.596640
  19. Kieslich, P. J., Wulff, D. U., Henninger, F., Haslbeck, J. M. B., & Schulte-Mecklenbeck, M. (2017). Mouse- and hand-tracking as a window to cognition: A tutorial on implementation, analysis, and visualization. Manuscript in preparation.Google Scholar
  20. Koop, G. J. (2013). An assessment of the temporal dynamics of moral decisions. Judgment and Decision Making, 8(5), 527–539.Google Scholar
  21. Koop, G. J., & Johnson, J. G. (2011). Response dynamics: A new window on the decision process. Judgment and Decision Making, 6(8), 750–758.Google Scholar
  22. Koop, G. J., & Johnson, J. G. (2013). The response dynamics of preferential choice. Cognitive Psychology, 67(4), 151–185. doi: 10.1016/j.cogpsych.2013.09.001 CrossRefPubMedGoogle Scholar
  23. Mathôt, S., Schreij, D., & Theeuwes, J. (2012). OpenSesame: An open-source, graphical experiment builder for the social sciences. Behavior Research Methods, 44(2), 314–324. doi: 10.3758/s13428-011-0168-7 CrossRefPubMedGoogle Scholar
  24. Oldfield, R. C. (1971). The assessment and analysis of handedness: The Edinburgh inventory. Neuropsychologia, 9(1), 97–113. doi: 10.1016/0028-3932(71)90067-4 CrossRefPubMedGoogle Scholar
  25. R Core Team (2016). R: A Language and Environment for Statistical Computing. Vienna, Austria: R Foundation for Statistical Computing.
  26. Resulaj, A., Kiani, R., Wolpert, D. M., & Shadlen, M. N. (2009). Changes of mind in decision-making. Nature, 461(7261), 263–266. doi: 10.1038/nature08275 CrossRefPubMedPubMedCentralGoogle Scholar
  27. Scherbaum, S., Dshemuchadse, M., Fischer, R., & Goschke, T. (2010). How decisions evolve: The temporal dynamics of action selection. Cognition, 115(3), 407–416. doi: 10.1016/j.cognition.2010.02.004 CrossRefPubMedGoogle Scholar
  28. Scherbaum, S., & Kieslich, P. J. (2017). Stuck at the starting line: How the starting procedure influences mouse-tracking data. Manuscript submitted for publication.Google Scholar
  29. Spivey, M. J., & Dale, R. (2006). Continuous dynamics in real-time cognition. Current Directions in Psychological Science, 15(5), 207–211. doi: 10.1111/j.1467-8721.2006.00437.x CrossRefGoogle Scholar
  30. Spivey, M. J., Grosjean, M., & Knoblich, G. (2005). Continuous attraction toward phonological competitors. Proceedings of the National Academy of Sciences of the United States of America, 102(29), 10393–10398. doi: 10.1073/pnas.0503903102 CrossRefPubMedPubMedCentralGoogle Scholar
  31. Wirth, R., Pfister, R., & Kunde, W. (2016). Asymmetric transfer effects between cognitive and affective task disturbances. Cognition and Emotion, 30(3), 399–416. doi: 10.1080/02699931.2015.1009002 CrossRefPubMedGoogle Scholar

Copyright information

© Psychonomic Society, Inc. 2017

Authors and Affiliations

  1. 1.Experimental Psychology, School of Social SciencesUniversity of MannheimMannheimGermany
  2. 2.Center for Doctoral Studies in Social and Behavioral SciencesUniversity of MannheimMannheimGermany
  3. 3.Cognitive Psychology LabUniversity of Koblenz-LandauLandauGermany
  4. 4.Max Planck Institute for Research on Collective GoodsBonnGermany

Personalised recommendations