Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pschichtel/virtualscanner
Scan barcodes from your screen and emit the content as key strokes.
https://github.com/pschichtel/virtualscanner
barcode-scanning java keystrokes qrcode scanner
Last synced: 2 months ago
JSON representation
Scan barcodes from your screen and emit the content as key strokes.
- Host: GitHub
- URL: https://github.com/pschichtel/virtualscanner
- Owner: pschichtel
- License: other
- Created: 2018-03-10T02:14:09.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-11-24T01:59:33.000Z (2 months ago)
- Last Synced: 2024-11-24T02:32:56.460Z (2 months ago)
- Topics: barcode-scanning, java, keystrokes, qrcode, scanner
- Language: Kotlin
- Size: 103 KB
- Stars: 1
- Watchers: 4
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# VirtualScanner
Scan barcodes from your screen and emit the content as key strokes.
The barcode scanning uses the [zxing](https://github.com/zxing/zxing) library, which is also commonly used in Android projects. If scanning does not work with specific barcode it is most likely due to this library not supporting the barcode.
## Usage
```java -jar virtual-scanner.jar [mode] [configuration]```
* `[mode]`: The mode (see below) to start in. Can be omitted.
* `[configuration]`: The configuration file to load. Can be omitted and defaults to `config.json`.### Modes
* `screen`: Scans all screens once for barcodes. This mode will be used if no mode has been specified.
* `clipboard`: Continuously scans the clipboard for images and scans them for barcodes.
* `layout`: A small UI to customize the character-key-mapping.### Configuration
A JSON file is loaded which configures to tool. The file can be specified or defaults to `config.json`.
```yaml
{
"layout": "layout.json",
"normalizeLinebreaks": true,
"prefix": [],
"suffix": [],
"delay": 1000,
"charset": "abc"
}
```
If the file is not found, defaults will be loaded: [Default config.json on Github](https://github.com/pschichtel/VirtualScanner/blob/master/src/main/resources/config.json).* `layout`: The layout file to map characters to keys on the keyboard. Relative paths will be relative to the working directory. The file `layout.json` will be loaded internally with defaults, if it does not exist.
* `normalizeLinebreaks`: Whether to normalize the linebreaks to `\n`.
* `prefix`: The key actions to generate *before* the barcode content.
* `suffix`: The key actions to generate *after* the barcode content.
* `delay`: The delay before the tool starts producing key events after detecting the barcode in milliseconds.
* `charset`: The characters to map in the layout file, used by the `layout` mode.
### DownloadGet the tool from the latest release on [Github](https://github.com/pschichtel/VirtualScanner/releases/latest)!
### Building
It is a standard Maven project that does not require any special configuration given a working Maven installation. `mvn clean package` should build an executable jar into the target folder.
## Action Sequence Syntax
* `+10` -> Press key with code 10 down
* `-10` -> Release key with code 10
* `~10` -> Press and release key with code 10## Testing
Try generating QR codes using e.g. [this website](https://barcode.tec-it.com). And make screenshots of them or copy the image directly to the clipboard.