Unpacking Software Livestream

Join our monthly Unpacking Software livestream to hear about the latest news, chat and opinion on packaging, software deployment and lifecycle management!

Learn More

Chocolatey Product Spotlight

Join the Chocolatey Team on our regular monthly stream where we put a spotlight on the most recent Chocolatey product releases. You'll have a chance to have your questions answered in a live Ask Me Anything format.

Learn More

Chocolatey Coding Livestream

Join us for the Chocolatey Coding Livestream, where members of our team dive into the heart of open source development by coding live on various Chocolatey projects. Tune in to witness real-time coding, ask questions, and gain insights into the world of package management. Don't miss this opportunity to engage with our team and contribute to the future of Chocolatey!

Learn More

Calling All Chocolatiers! Whipping Up Windows Automation with Chocolatey Central Management

Webinar from
Wednesday, 17 January 2024

We are delighted to announce the release of Chocolatey Central Management v0.12.0, featuring seamless Deployment Plan creation, time-saving duplications, insightful Group Details, an upgraded Dashboard, bug fixes, user interface polishing, and refined documentation. As an added bonus we'll have members of our Solutions Engineering team on-hand to dive into some interesting ways you can leverage the new features available!

Watch On-Demand
Chocolatey Community Coffee Break

Join the Chocolatey Team as we discuss all things Community, what we do, how you can get involved and answer your Chocolatey questions.

Watch The Replays
Chocolatey and Intune Overview

Webinar Replay from
Wednesday, 30 March 2022

At Chocolatey Software we strive for simple, and teaching others. Let us teach you just how simple it could be to keep your 3rd party applications updated across your devices, all with Intune!

Watch On-Demand
Chocolatey For Business. In Azure. In One Click.

Livestream from
Thursday, 9 June 2022

Join James and Josh to show you how you can get the Chocolatey For Business recommended infrastructure and workflow, created, in Azure, in around 20 minutes.

Watch On-Demand
The Future of Chocolatey CLI

Livestream from
Thursday, 04 August 2022

Join Paul and Gary to hear more about the plans for the Chocolatey CLI in the not so distant future. We'll talk about some cool new features, long term asks from Customers and Community and how you can get involved!

Watch On-Demand
Hacktoberfest Tuesdays 2022

Livestreams from
October 2022

For Hacktoberfest, Chocolatey ran a livestream every Tuesday! Re-watch Cory, James, Gary, and Rain as they share knowledge on how to contribute to open-source projects such as Chocolatey CLI.

Watch On-Demand

MouseTrap DPI aware mouse move across screens

This is a prerelease version of MouseTrap DPI aware mouse move across screens.

  • 1
  • 2
  • 3

1.0.20-beta | Updated: 28 Nov 2023

Downloads:

1,473

Downloads of v 1.0.20-beta:

26

Maintainer(s):

Software Author(s):

  • René Larch

MouseTrap DPI aware mouse move across screens 1.0.20-beta

This is a prerelease version of MouseTrap DPI aware mouse move across screens.

  • 1
  • 2
  • 3

All Checks are Passing

3 Passing Tests


Validation Testing Passed


Verification Testing Passed

Details

Scan Testing Successful:

No detections found in any package files

Details
Learn More

Deployment Method: Individual Install, Upgrade, & Uninstall

To install MouseTrap DPI aware mouse move across screens, run the following command from the command line or from PowerShell:

>

To upgrade MouseTrap DPI aware mouse move across screens, run the following command from the command line or from PowerShell:

>

To uninstall MouseTrap DPI aware mouse move across screens, run the following command from the command line or from PowerShell:

>

Deployment Method:

NOTE

This applies to both open source and commercial editions of Chocolatey.

1. Enter Your Internal Repository Url

(this should look similar to https://community.chocolatey.org/api/v2/)


2. Setup Your Environment

1. Ensure you are set for organizational deployment

Please see the organizational deployment guide

2. Get the package into your environment

  • Open Source or Commercial:
    • Proxy Repository - Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to https://community.chocolatey.org/api/v2/. Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
    • You can also just download the package and push it to a repository Download

3. Copy Your Script

choco upgrade mousetrap -y --source="'INTERNAL REPO URL'" --prerelease [other options]

See options you can pass to upgrade.

See best practices for scripting.

Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.

If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:


choco upgrade mousetrap -y --source="'INTERNAL REPO URL'" --prerelease
$exitCode = $LASTEXITCODE

Write-Verbose "Exit code was $exitCode"
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
if ($validExitCodes -contains $exitCode) {
  Exit 0
}

Exit $exitCode

- name: Install mousetrap
  win_chocolatey:
    name: mousetrap
    version: '1.0.20-beta'
    source: INTERNAL REPO URL
    state: present
    allow_prerelease: yes

See docs at https://docs.ansible.com/ansible/latest/modules/win_chocolatey_module.html.


chocolatey_package 'mousetrap' do
  action    :install
  source   'INTERNAL REPO URL'
  version  '1.0.20-beta'
  options  '--prerelease'
end

See docs at https://docs.chef.io/resource_chocolatey_package.html.


cChocoPackageInstaller mousetrap
{
    Name        = "mousetrap"
    Version     = "1.0.20-beta"
    Source      = "INTERNAL REPO URL"
    chocoParams = "--prerelease"
}

Requires cChoco DSC Resource. See docs at https://github.com/chocolatey/cChoco.


package { 'mousetrap':
  ensure          => '1.0.20-beta',
  install_options => ['--prerelease'],
  provider        => 'chocolatey',
  source          => 'INTERNAL REPO URL',
}

Requires Puppet Chocolatey Provider module. See docs at https://forge.puppet.com/puppetlabs/chocolatey.


4. If applicable - Chocolatey configuration/installation

See infrastructure management matrix for Chocolatey configuration elements and examples.

NOTE

Private CDN cached downloads available for licensed customers. Never experience 404 breakages again! Learn more...

WARNING

This package is exempt from moderation. While it is likely safe for you, there is more risk involved.

Description

MouseTrap

MouseTrap is a small tool to map the cursor between multiple monitors with
different resolutions and scaling settings.

## Min requirements

For this tool to function correctly you should have:

- At least Windows 10 Creators update (Build 1703)
- .NET 8 Runtime (in most cases it will notify you if the runtime is missing)

## Usage and Configuration

Here you can find the documentation.


LICENSE.txt
MIT License

Copyright (c) 2018 René Larch

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
VERIFICATION.txt

VERIFICATION
Verification is intended to assist the Chocolatey moderators and community
in verifying that this package's contents are trustworthy.


This package contains the tool MouseTrap.
This is an open source Windows Application written by me (René Larch).
You can find the source code on github:

 * https://github.com/r-Larch/MouseTrap/

Files:

|-------------------------------|--------------------------------------------------------|
| Files                         | Description                                            |
|-------------------------------|--------------------------------------------------------|
| MouseTrap.exe                 | Executable .NET wrapper to start the .NET Core Runtime |
| MouseTrap.dll                 | The actual application to run in the .NET Core Runtime |
| MouseTrap.pdb                 | Debugging symbols to have better error reports         |
| MouseTrap.deps.json           | Dependencies file required for the .NET Core Runtime   |
| MouseTrap.runtimeconfig.json  | Runtimeconfig file required for the .NET Core Runtime  |
|-------------------------------|--------------------------------------------------------|
tools\Push.ps1

param (
	[string] $nuspec,
	[string] $zip,
	[string] $version,
    [switch] $debug = $false
)


function Main() {
	$dir  = Split-Path -parent $nuspec;

	$choco = @{
		version = $version
		nuspec = $nuspec
		dir = $dir
		installScript = [System.IO.Path]::Combine($dir, "chocolateyinstall.ps1")
		uninstallScript = [System.IO.Path]::Combine($dir, "chocolateyuninstall.ps1")
	}

	$hash = (Get-FileHash -Algorithm SHA256 -Path $zip).Hash.ToUpper()
	ChocoUpdateScript $choco $version $hash

	Push-Location $dir
	$previousTag = [Git]::GetVersionTags() | where { $_ -ne "v$version" } | sort -Descending | select -first 2 | select -last 1;
	$history = [Git]::GetHistorySince($previousTag);
	Pop-Location

	ChocoUpdateNuspec $choco $history "https://api.github.com/repos/r-Larch/MouseTrap"

	ChocoPublish $choco $debug

}


function ChocoUpdateScript([object] $choco, [string] $version, [string] $hash) {
    $script = Get-Content $choco.installScript -Encoding UTF8 -Raw
    $script = $script.replace('<version>', $version)
	$script = $script.replace('<hash>', $hash)
    $script | Set-Content $choco.installScript -Force -Encoding UTF8
}


function ChocoUpdateNuspec([object] $choco, [string] $history, [string] $githubRepoApi) {
	$repo = $(Invoke-Webrequest $githubRepoApi).Content | ConvertFrom-Json;
	$topics = $(Invoke-Webrequest $githubRepoApi/topics -Headers @{'Accept'='application/vnd.github.mercy-preview+json'}).Content | ConvertFrom-Json
	$xml = [xml] $(gc -Path $choco.nuspec -Encoding UTF8);
	$xml.package.metadata.version = [Regex]::Replace($version, '^v', '');
	$xml.package.metadata.summary = $repo.description;
	$xml.package.metadata.tags = [string]::Join(" ", $topics.names);
	$xml.package.metadata.copyright = "Copyright $([DateTime]::Now.Year) René Larch";
	$xml.package.metadata.releaseNotes = [string]::Join("`r`n", $history);
	$xml.Save($choco.nuspec);
}


function ChocoPublish([object] $choco, [bool] $debug = $false) {

	$chocoCommand = "choco";
	if (!$(Get-Command $chocoCommand -errorAction SilentlyContinue)) {
		Write-Host "Install chocolatey";
		iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex
		$env:Path += ";%ALLUSERSPROFILE%\chocolatey\bin";
	}

	# create the nuspec package
	& $chocoCommand pack $choco.nuspec --out $choco.dir

	$ver = [Regex]::Replace($choco.version, "^v(.*)", '$1');
	$nupkgName = $choco.nuspec.replace('.nuspec', ".$($ver).nupkg");

	if (!$debug) {
		# if token is given, we will publish the package to Chocolatey here
		if ($env:CHOCO_TOKEN) {
			& $chocoCommand apiKey -k $env:CHOCO_TOKEN -source https://push.chocolatey.org/
			& $chocoCommand push $nupkgName -source https://push.chocolatey.org/
		} else {
			Write-Warning "Chocolatey token was not set. Publication skipped."
		}
	} else {
		# For development/debugging purposes
		$script = Get-Content $choco.installScript -Encoding UTF8 -Raw
		Write-Host "=============== Choco Install Script ==============="
		Write-Host $script
		Write-Host "===================================================="

		$script = Get-Content $choco.uninstallScript -Encoding UTF8 -Raw
		Write-Host "============== Choco Uninstall Script =============="
		Write-Host $script
		Write-Host "===================================================="

		$nuspec = Get-Content $choco.nuspec -Encoding UTF8 -Raw
		Write-Host "================== Nuspec ==========================="
		Write-Host $nuspec
		Write-Host "===================================================="

		Write-Host "$chocoCommand pack " $choco.nuspec
		Write-Host "$chocoCommand apiKey -k $env:CHOCO_TOKEN -source https://push.chocolatey.org/"
		Write-Host "$chocoCommand push $nupkgName"
	}
}


class Git {
	static [string[]] GetTags() {
		return $(git tag --list).Split("`n");
	}
	static [string[]] GetVersionTags() {
		return [Git]::GetTags() | Select-String -pattern "v[\d+\.]+(-(alpha|beta))?";
	}
	static [string[]] GetHistorySince([string] $tagOrHash) {
        if ([string]::IsNullOrEmpty($tagOrHash)){
            return $(git log --oneline);
        }
		return $(git log "$tagOrHash..HEAD" --oneline);
	}
}


#########################
#		run main        #
#########################

Main;

#########################
tools\chocolateyinstall.ps1
$ErrorActionPreference = 'Stop';

$version       = 'v1.0.20-beta'
$hash          = '080E729681FAC6E01D2538B70EB1A5FAA497CF3C3CAA6755DDFD03CBB3E35C94'
$versionNumber = [Regex]::Replace($version, 'v(\d+\.\d+\.\d+).*', '$1')

$packageName   = 'mousetrap'
$toolsDir      = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$url           = "https://github.com/r-Larch/MouseTrap/releases/download/$version/MouseTrap-$versionNumber.zip"


$packageArgs = @{
  packageName   = $packageName
  unzipLocation = $toolsDir
  url           = $url
  checksum      = $hash
  checksumType  = 'SHA256'
}

Install-ChocolateyZipPackage @packageArgs


$mousetrap = "$toolsDir\$packageName";

# install
& $mousetrap "-i";
if (-not $?) {
	throw "error while install";
}

# start the app minimized as tray icon in taskbar.
& $mousetrap

tools\chocolateyuninstall.ps1

$ErrorActionPreference = 'Stop';

$packageName= 'mousetrap.exe'
$toolsDir   = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"

$mousetrap = "$toolsDir\$packageName";

# uninstall
& $mousetrap "-u";
if (-not $?) {
	throw "error while uninstall";
}

Log in or click on link to see number of positives.

In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.

Add to Builder Version Downloads Last Updated Status
MouseTrap DPI aware mouse move across screens 1.0.20-beta 26 Tuesday, November 28, 2023 Exempted
MouseTrap DPI aware mouse move across screens 1.0.5 359 Saturday, October 19, 2019 Approved
MouseTrap DPI aware mouse move across screens 1.0.2 157 Saturday, October 19, 2019 Approved
MouseTrap DPI aware mouse move across screens 1.0.1 270 Thursday, February 28, 2019 Approved
MouseTrap DPI aware mouse move across screens 1.0.0 239 Sunday, January 13, 2019 Approved

d455296 feat: add chocolatey support a89683b chore: update README.md [no ci] 72f3db7 chore: cleanup [no ci] 374d099 feat: remove dep newtonsoft.json [no ci] 06c97f5 feat: migrate to github actions e492b0f feat: update README.md 172949a feat: update to net8.0 02f6b37 fix: copy to clipboard 7a4969b fix: nuspec 6f8d98e feat: update build image 79b7c64 feat: update actions key f2792e2 fix: build script b949fb5 chore: update readme 1c455cd fix: open settings 6f8925c chore: pattern matching 3df607b fix: small bugs cc4439d file scope 0ada1f4 use toplevel statments in program 5c4c0ef migrate to file scoped namespace cdbab5f migrate to net6 c052fd7 trigger CI only for master branch 053976a add mouse teleportation toggle menu strip item 4b0cb42 release mouse clip if we are not on input desktop b027eb2 update release description db8cbd8 update release build scripts 989b0f8 potential fix for #2 325e3ec fix: style bug 7f050ed performance optimization eb752d1 add diagnostic form 3601d52 add TeleportationActive option c6e78b8 refactor remove Windows.Forms dep from config 904f53d refactor and fix ProjectInstaller b91b8a0 refactor ConfigForm to fix some known issues de39276 refactor to not use Thread.Abort() anymore 1150159 migrate to .net 5 654281f spelling cca2ba6 adds appveyor badge f5a0ad7 add choco artifacts


This package has no dependencies.

Discussion for the MouseTrap DPI aware mouse move across screens Package

Ground Rules:

  • This discussion is only about MouseTrap DPI aware mouse move across screens and the MouseTrap DPI aware mouse move across screens package. If you have feedback for Chocolatey, please contact the Google Group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or MouseTrap DPI aware mouse move across screens, or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.
comments powered by Disqus