Find Jobs
Hire Freelancers

Program to detect mouse button down

$10-30 CAD

Completed
Posted about 8 years ago

$10-30 CAD

Paid on delivery
A short, simple Objective-C program written to a source file (e.g. mouse.m) that can be compiled with Clang on the command-line into a Unix Executable File for placement in a directory in the $PATH variable such as /usr/local/bin. When run on the command-line in a Bash shell, or used in AppleScript’s do shell script command, the program detects whether no mouse button is pressed down, the left mouse button is pressed down, or the right mouse button is pressed down. In Terminal it might look like this after each press of the Return key: bash-3.2$ mouse none bash-3.2$ mouse left bash-3.2$ mouse right // Extensive commenting in the code is an asset. Provide the compile command, e.g. clang mouse.m -framework Cocoa -o mouse I retain all rights and privileges to the source code and any product thereof, and may freely distribute the same without attribution. A price quote as per the above description. Options to be priced separately: A second version of the program written in Swift. Detection of a trackpad click and secondary click.
Project ID: 10441353

About the project

1 proposal
Remote project
Active 8 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Hi, I have prepared the code that fulfills your requirement, both in Objective-C and Swift. It works both for mouse and trackpad (without distinguishing those events). When run, it reads the state of mouse and prints the required output. Objective-C code will work on 10.6 or newer systems, Swift will run on all systems that support swift. Regards, Jacek
$20 CAD in 2 days
5.0 (2 reviews)
2.5
2.5

About the client

Flag of CANADA
Calgary, Canada
5.0
2
Member since May 8, 2016

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.