-
-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'epic/linux-mcompile' into chore/merge-master-into-linux…
…-mcompile
- Loading branch information
Showing
17 changed files
with
4,101 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,4 +134,3 @@ TabWidth: 8 | |
UseCRLF: false | ||
UseTab: Never | ||
... | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
This is a proposal to rewrite mcompile for Linux. For this we need to query the base keyboard data from the Linux platform, then rewriting the keyboard .kmx using the same approach as is done in mcompile for Windows, but working from the data from the x11 keyboard on Linux. | ||
|
||
Ideally, we'd rewrite mcompile to be cross-platform (Windows, Linux, macOS), so that the keyboard interrogation would be separated from the .kmx rewriting, at least to some degree. Nevertheless it would probably be easiest to start from a standalone implementation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
resources/ | ||
build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
This is a proposal to rewrite mcompile for Linux. For this we need to query the base keyboard data from the Linux platform, then rewriting the keyboard .kmx using the same approach as is done in mcompile for Windows, but working from the data from the x11 keyboard on Linux. | ||
|
||
Ideally, we'd rewrite mcompile to be cross-platform (Windows, Linux, macOS), so that the keyboard interrogation would be separated from the .kmx rewriting, at least to some degree. Nevertheless it would probably be easiest to start from a standalone implementation. | ||
Sample program that reads US basic keyboard and compares to key value group | ||
|
||
|
||
# Keymap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#!/usr/bin/env bash | ||
|
||
## START STANDARD BUILD SCRIPT INCLUDE | ||
# adjust relative paths as necessary | ||
THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" | ||
. "${THIS_SCRIPT%/*}/../../../resources/build/builder.inc.sh" | ||
## END STANDARD BUILD SCRIPT INCLUDE | ||
|
||
#. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh" | ||
|
||
################################ Main script ################################ | ||
|
||
builder_describe \ | ||
"Mnemonic layout recompiler for Linux" \ | ||
"@/common/include" \ | ||
"clean" \ | ||
"configure" \ | ||
"build" \ | ||
"test" | ||
|
||
builder_parse "$@" | ||
|
||
builder_describe_outputs \ | ||
configure build/build.ninja \ | ||
build build/mcompile | ||
|
||
TARGET_PATH="$THIS_SCRIPT_PATH/build" | ||
|
||
do_clean() { | ||
rm -rf "$THIS_SCRIPT_PATH/resources" | ||
rm -rf "$TARGET_PATH" | ||
} | ||
|
||
do_configure() { | ||
# Import our standard compiler defines; this is copied from | ||
# /resources/build/meson/standard.meson.build by build.sh, because meson doesn't | ||
# allow us to reference a file outside its root | ||
mkdir -p "$THIS_SCRIPT_PATH/resources" | ||
cp "$KEYMAN_ROOT/resources/build/meson/standard.meson.build" "$THIS_SCRIPT_PATH/resources/meson.build" | ||
|
||
pushd "$THIS_SCRIPT_PATH" > /dev/null | ||
# Additional arguments are used by Linux build, e.g. -Dprefix=${INSTALLDIR} | ||
meson setup build --buildtype $BUILDER_CONFIGURATION "${builder_extra_params[@]}" | ||
popd > /dev/null | ||
|
||
} | ||
|
||
do_build() { | ||
pushd "$TARGET_PATH" > /dev/null | ||
ninja | ||
popd > /dev/null | ||
} | ||
|
||
do_test() { | ||
pushd "$TARGET_PATH" > /dev/null | ||
meson test "${builder_extra_params[@]}" | ||
popd > /dev/null | ||
} | ||
|
||
builder_run_action clean do_clean | ||
builder_run_action configure do_configure | ||
builder_run_action build do_build | ||
builder_run_action test do_test |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
#pragma once | ||
#ifndef DEADKEY_H | ||
#define DEADKEY_H | ||
|
||
#include "mc_import_rules.h" | ||
#include <map> | ||
|
||
/** @brief create a Vector of DeadKey containing all combinations of deadkey + character for ALL possible Linux keyboards */ | ||
std::vector<DeadKey*> create_deadkeys_by_basechar(); | ||
|
||
/** @brief filter entries for the currently used Linux Keyboard out of a vector of all existing deadKey combinations */ | ||
void refine_alDead(KMX_WCHAR dk, std::vector<DeadKey*>& dkVec, std::vector<DeadKey*>& r_All_Vec); | ||
|
||
/** @brief check whether a deadkey already exists in the deadkey vector */ | ||
bool found_dk_inVector(KMX_WCHAR dk, std::vector<DeadKey*>& dkVec); | ||
|
||
/** @brief find all deadkey combinations for a certain deadkey in a vector of all deadkey combinations */ | ||
bool query_dk_combinations_for_specific_dk(vec_dword_2D& r_dk_ComposeTable, KMX_DWORD dk, vec_dword_2D& dk_SingleTable); | ||
|
||
/** @brief convert a character to the upper-case equivalent and find the corresponding shiftstate of the entered keyval */ | ||
KMX_DWORD KMX_change_keyname_to_capital(KMX_DWORD kVal, KMX_DWORD& shift, GdkKeymap* keymap); | ||
|
||
/** @brief append a 1D-vector containing name, base character and unicode_value to a 2D-Vector */ | ||
void add_deadkey_combination(vec_dword_2D& dk_ComposeTable, std::string diacritic_name, std::string base_char, KMX_DWORD unicode_value); | ||
|
||
/** @brief create a 2D-Vector containing all possible combinations of deadkey + character for all Linux keyboards */ | ||
void create_DKTable(vec_dword_2D& dk_ComposeTable); | ||
|
||
#endif /*DEADKEY_H*/ |
Oops, something went wrong.