Skip to content

Commit

Permalink
* Initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
giladreich committed Jun 6, 2019
0 parents commit c3fc322
Show file tree
Hide file tree
Showing 290 changed files with 19,364 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
bin/
.vs/
*.aps
GeneratedFiles/
Release/
Debug/
data*/
29 changes: 29 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

cmake_minimum_required(VERSION 3.12)

##################################################################################################################
# Setup
##################################################################################################################

project(QuickCut
LANGUAGES C CXX
DESCRIPTION "QuickCut is the way to master your keyboard."
)

##################################################################################################################
# IDE Representation
##################################################################################################################

# Groups CMake pre-defined projects
set_property(GLOBAL PROPERTY USE_FOLDERS ON)

set_property (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY
VS_STARTUP_PROJECT QuickCut
)

##################################################################################################################
# Submodules
##################################################################################################################

add_subdirectory(src)

21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 Gilad Reich

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.
148 changes: 148 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@

<p align="center"><img src="pictures/logo.png" width=256 height=256></p>

# QuickCut

QuickCut is a shortcut keyboard manager that allows you to map keys and activate specified processes.

QuickCut allows you shorthand access to your most used apps at the convenience of your chosen keyboard keys. It allows you to tailor your keyboard layoutdesign making your time as effecient as possible.


## Getting Started

Download links can be found [here](https://github.com/giladreich/QuickCut/releases).


QuickCut is designed to be as portable as possible by using `Profiles` and `Actions` in a one to many relationship(profile can create multiple actions) that are saved in `Json` format, so you can easily change between each profile to create different working environment depending on the selected profile(which also makes it easier sharing your profiles with others).

### Creating your first `Profile`

When you first starting QuickCut, you'll see the following window:

![Create Profile](/pictures/create_profile.png)

![Create Profile](/pictures/first_main_window.png)

Don't forget that you can create multiple profiles. As soon as you click the `Default` button, all the shortcuts for the selected profile will be activated.

### Creating your first `Action`

There are two type of actions:

* Key Mapping - Fully maps a desired key to the specified key(no restart required).
* Start Application - Maps a desired key to do the specified action, i.e open specific directory or your favorite application.

`Key Mapping` should look as the following:

![Create Profile](/pictures/action_window_map_screenshot.png)

As soon as you click the green record button, the keycode that related to that key you're targeting will be added to the text-box:

![Create Profile](/pictures/action_window_map_screenshot_record.png)

`Start Application` should look as the following:

![Create Profile](/pictures/action_window_map_snippingtool.png)

In this example, snipping tool will start as soon as we hit the F14 key.

We can also also use multiple keys for a shortcut:

![Create Profile](/pictures/action_window_map_keycombo.png)


So we end up with a configuration file under `Config/profiles.json` that can be easily shared with others:

```json
{
"activeProfile": "{9d146d79-fba5-48bc-9841-aee8bea2826a}",
"profileCount": 1,
"profiles": [
{
"id": "{9d146d79-fba5-48bc-9841-aee8bea2826a}",
"name": "Home Environment",
"lastModified": "2019-06-06T08:16:26",
"actionsCount": 2,
"actions": [
{
"id": "{9c6f3bba-fc58-4ebd-98ba-cc70fa503ba7}",
"actionName": "F13 Map to Screenshot",
"type": "KeyMap",
"srcKey": "7c",
"dstKey": "2c",
"appPath": "",
"appArgs": "",
"createdDate": "2019-06-06T07:52:24"
},
{
"id": "{e75e41f5-de4f-422d-952f-a0a91bcaf62b}",
"actionName": "CTRL+SHIFT+F14 Start SnippingTool",
"type": "AppStart",
"srcKey": "a2a07d",
"dstKey": "",
"appPath": "C:\/WINDOWS\/system32\/SnippingTool.exe",
"appArgs": "",
"createdDate": "2019-06-06T08:04:59"
}
]
}
]
}
```

### Summary

We covered the important basics of QuickCut, so we know how to interact with profiles and actions, but there are more features added to QuickCut that you can explore around.

Note that as soon as you're done creating your profiles and actions, you don't need to worry about the QuickCut GUI to be opened anymore. You can just use your computer regulary and everything should just work.

### Prerequisites

Project Structure:

* QuickCut - The actual GUI.
* QuickCutConsole - Mapps the actual key strokes and parses the `profiles.json` file.
* QuickCutService - Responsible for making sure that `QuickCutConsole` is running and also future updater is planned.

All QuickCut projects are using the Qt Framework and designed to be portable across different platforms. Currently the code should compile on all platforms, but the the `QuickCutConsole` and `QuickCutService` requires a Unix hook implementation to make this work on different platforms, which I didn't have the time yet to do so(pull requests for this feature are very welcomed!).

Requirements for building the project:

* Qt MSVC41 x64/x86 kits.
* VS MSVC41 compiler.
* Boost 1.69.0 MSVC141_x64/x86.
* VS17 and Qt VS Plugin(if you want to use the VS solution).
* CMake 3.12(will be supported later).


## Motivation

I always connect my laptop to a monitor using external keyboard and mouse.

This is my favorite keyboard that I currently use at home:

![Apple Keyboard](/pictures/apple_keyboard.png)

It has F13 til F19 keys which never worked for me, so I looked up for alternative solutions and I found out about `KeyTweak` and some other programs that all they do, is editing the registry using the default functionality Windows has for mapping keys. So I was excited for a second and I though that this actually did it for me, but unfortunately every time you map a key on the windows registry, that requires a full reboot to the system in order to load the new key mapping layout.
It also doesn't let you map a combination of keys to a key.

Long story short, I though about alternative solutions that brought me to the idea of making a fully interactive application that runs as a background service which does all the key mapping for me with the ability of creating different actions to be as efficient as possible when using the keyboard.

For that reason `QuickCut` is here and free to use :)

## Contributing

Pull-Requests are more than welcome and will be very appreciated. So feel free to contribute if you want to improve the project.

Same goes for opening issues, if you have any suggestions, feedback or you found any bugs, please do not hesitate to open an [issue](https://github.com/giladreich/QtDirect3D/issues).

## Authors

* **Gilad Reich** - *Initial work* - [giladreich](https://github.com/giladreich)

See also the list of [contributors](https://github.com/giladreich/QtDirect3D/graphs/contributors) who participated in this project.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

Binary file added pictures/action_window_map_keycombo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pictures/action_window_map_screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pictures/action_window_map_screenshot_record.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pictures/action_window_map_snippingtool.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pictures/apple_keyboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pictures/clean_action_window.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pictures/create_profile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pictures/first_main_window.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pictures/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pictures/logo.psd
Binary file not shown.
3 changes: 3 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

# TODO: Finish writting scripts.

51 changes: 51 additions & 0 deletions src/QuickCut.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.572
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QuickCut", "QuickCut\QuickCut.vcxproj", "{B12702AD-ABFB-343A-A199-8E24837244A3}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QuickCutService", "QuickCutService\QuickCutService.vcxproj", "{64C0215D-FA4A-4CFB-A36D-A65C0A041538}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QuickCutConsole", "QuickCutConsole\QuickCutConsole.vcxproj", "{B741AF33-8F2D-4FC3-A9BA-FB36FA4A98A1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B12702AD-ABFB-343A-A199-8E24837244A3}.Debug|x64.ActiveCfg = Debug|x64
{B12702AD-ABFB-343A-A199-8E24837244A3}.Debug|x64.Build.0 = Debug|x64
{B12702AD-ABFB-343A-A199-8E24837244A3}.Debug|x86.ActiveCfg = Debug|Win32
{B12702AD-ABFB-343A-A199-8E24837244A3}.Debug|x86.Build.0 = Debug|Win32
{B12702AD-ABFB-343A-A199-8E24837244A3}.Release|x64.ActiveCfg = Release|x64
{B12702AD-ABFB-343A-A199-8E24837244A3}.Release|x64.Build.0 = Release|x64
{B12702AD-ABFB-343A-A199-8E24837244A3}.Release|x86.ActiveCfg = Release|Win32
{B12702AD-ABFB-343A-A199-8E24837244A3}.Release|x86.Build.0 = Release|Win32
{64C0215D-FA4A-4CFB-A36D-A65C0A041538}.Debug|x64.ActiveCfg = Debug|x64
{64C0215D-FA4A-4CFB-A36D-A65C0A041538}.Debug|x64.Build.0 = Debug|x64
{64C0215D-FA4A-4CFB-A36D-A65C0A041538}.Debug|x86.ActiveCfg = Debug|Win32
{64C0215D-FA4A-4CFB-A36D-A65C0A041538}.Debug|x86.Build.0 = Debug|Win32
{64C0215D-FA4A-4CFB-A36D-A65C0A041538}.Release|x64.ActiveCfg = Release|x64
{64C0215D-FA4A-4CFB-A36D-A65C0A041538}.Release|x64.Build.0 = Release|x64
{64C0215D-FA4A-4CFB-A36D-A65C0A041538}.Release|x86.ActiveCfg = Release|Win32
{64C0215D-FA4A-4CFB-A36D-A65C0A041538}.Release|x86.Build.0 = Release|Win32
{B741AF33-8F2D-4FC3-A9BA-FB36FA4A98A1}.Debug|x64.ActiveCfg = Debug|x64
{B741AF33-8F2D-4FC3-A9BA-FB36FA4A98A1}.Debug|x64.Build.0 = Debug|x64
{B741AF33-8F2D-4FC3-A9BA-FB36FA4A98A1}.Debug|x86.ActiveCfg = Debug|Win32
{B741AF33-8F2D-4FC3-A9BA-FB36FA4A98A1}.Debug|x86.Build.0 = Debug|Win32
{B741AF33-8F2D-4FC3-A9BA-FB36FA4A98A1}.Release|x64.ActiveCfg = Release|x64
{B741AF33-8F2D-4FC3-A9BA-FB36FA4A98A1}.Release|x64.Build.0 = Release|x64
{B741AF33-8F2D-4FC3-A9BA-FB36FA4A98A1}.Release|x86.ActiveCfg = Release|Win32
{B741AF33-8F2D-4FC3-A9BA-FB36FA4A98A1}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {DBB09E3C-F8A2-44EE-AB36-385C62851D8B}
EndGlobalSection
EndGlobal
17 changes: 17 additions & 0 deletions src/QuickCut/AboutWindow.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

#include "AboutWindow.h"


AboutWindow::AboutWindow(QWidget * parent)
: QDialog(parent)
, ui(new Ui::AboutWindow())
{
ui->setupUi(this);
setWindowFlags((windowFlags() & ~Qt::WindowContextHelpButtonHint) | Qt::MSWindowsFixedSizeDialogHint);

connect(ui->btnClose, &QPushButton::clicked, this, [this] { close(); });
}

AboutWindow::~AboutWindow()
{
}
18 changes: 18 additions & 0 deletions src/QuickCut/AboutWindow.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

#pragma once

#include <QDialog>
#include "ui_AboutWindow.h"


class AboutWindow : public QDialog
{
Q_OBJECT

public:
AboutWindow(QWidget * parent = Q_NULLPTR);
~AboutWindow();

private:
Ui::AboutWindow * ui;
};
Loading

0 comments on commit c3fc322

Please sign in to comment.