mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2026-01-27 10:50:51 +01:00
Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
72b1206bbe | ||
|
|
8dcd5a2c17 | ||
|
|
3833917e91 | ||
|
|
45e64eeed3 | ||
|
|
1d700b7d2f | ||
|
|
27eaaae591 | ||
|
|
2ccdc6433d | ||
|
|
79269772e9 | ||
|
|
5fe0536b81 | ||
|
|
58b7918d15 | ||
|
|
388d03f495 | ||
|
|
c32a0df75b | ||
|
|
b51421c157 | ||
|
|
eed51b8759 | ||
|
|
f8a1d2503f | ||
|
|
4753d77077 | ||
|
|
2c0a20e2e1 | ||
|
|
ed92cc78cf | ||
|
|
9e7b887097 | ||
|
|
d3c861036e | ||
|
|
f5655d4bae |
@@ -77,6 +77,7 @@ function create_image_bundle {
|
||||
sed 's/JBR/JBRSDK/g' "$IMAGES_DIR"/"$__root_dir"/release > release
|
||||
mv release "$IMAGES_DIR"/"$__root_dir"/release
|
||||
cp $IMAGES_DIR/jdk/lib/src.zip "$IMAGES_DIR"/"$__root_dir"/lib
|
||||
cp $IMAGES_DIR/jdk/lib/server/*.jsa "$IMAGES_DIR"/"$__root_dir"/lib/server
|
||||
copy_jmods "$__modules" "$__modules_path" "$IMAGES_DIR"/"$__root_dir"/jmods
|
||||
zip_native_debug_symbols $IMAGES_DIR/jdk "${JBR}_diz"
|
||||
fi
|
||||
@@ -137,10 +138,18 @@ echo Fixing permissions
|
||||
chmod -R a+r $JSDK
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module_aarch64.patch || do_exit $?
|
||||
update_jsdk_mods $JSDK $JCEF_PATH/jmods $JSDK/jmods $JSDK_MODS_DIR || do_exit $?
|
||||
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not changed
|
||||
cat $JCEF_PATH/jcef.version >> $JSDK/release
|
||||
if [ -d "$JCEF_PATH" ]; then
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module_aarch64.patch || do_exit $?
|
||||
update_jsdk_mods $JSDK $JCEF_PATH/jmods $JSDK/jmods $JSDK_MODS_DIR || do_exit $?
|
||||
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not changed
|
||||
cat $JCEF_PATH/jcef.version >> $JSDK/release
|
||||
else
|
||||
if [ "$bundle_type" == "jcef" ]; then
|
||||
echo "*** ERROR *** $JCEF_PATH not found" && do_exit 1
|
||||
else
|
||||
echo "*** WARNING *** $JCEF_PATH not found"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# create runtime image bundle
|
||||
|
||||
@@ -77,6 +77,7 @@ function create_image_bundle {
|
||||
sed 's/JBR/JBRSDK/g' "$IMAGES_DIR"/"$__root_dir"/release > release
|
||||
mv release "$IMAGES_DIR"/"$__root_dir"/release
|
||||
cp $IMAGES_DIR/jdk/lib/src.zip "$IMAGES_DIR"/"$__root_dir"/lib
|
||||
cp $IMAGES_DIR/jdk/lib/server/*.jsa "$IMAGES_DIR"/"$__root_dir"/lib/server
|
||||
copy_jmods "$__modules" "$__modules_path" "$IMAGES_DIR"/"$__root_dir"/jmods
|
||||
zip_native_debug_symbols $IMAGES_DIR/jdk "${JBR}_diz"
|
||||
fi
|
||||
@@ -137,10 +138,18 @@ echo Fixing permissions
|
||||
chmod -R a+r $JSDK
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
update_jsdk_mods $JSDK $JCEF_PATH/jmods $JSDK/jmods $JSDK_MODS_DIR || do_exit $?
|
||||
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not changed
|
||||
cat $JCEF_PATH/jcef.version >> $JSDK/release
|
||||
if [ -d "$JCEF_PATH" ]; then
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
update_jsdk_mods $JSDK $JCEF_PATH/jmods $JSDK/jmods $JSDK_MODS_DIR || do_exit $?
|
||||
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not changed
|
||||
cat $JCEF_PATH/jcef.version >> $JSDK/release
|
||||
else
|
||||
if [ "$bundle_type" == "jcef" ]; then
|
||||
echo "*** ERROR *** $JCEF_PATH not found" && do_exit 1
|
||||
else
|
||||
echo "*** WARNING *** $JCEF_PATH not found"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# create runtime image bundle
|
||||
|
||||
@@ -65,6 +65,7 @@ function create_image_bundle {
|
||||
sed 's/JBR/JBRSDK/g' "$IMAGES_DIR"/"$__root_dir"/release > release
|
||||
mv release "$IMAGES_DIR"/"$__root_dir"/release
|
||||
cp $IMAGES_DIR/jdk/lib/src.zip "$IMAGES_DIR"/"$__root_dir"/lib
|
||||
cp $IMAGES_DIR/jdk/lib/server/*.jsa "$IMAGES_DIR"/"$__root_dir"/lib/server
|
||||
copy_jmods "$__modules" "$__modules_path" "$IMAGES_DIR"/"$__root_dir"/jmods
|
||||
zip_native_debug_symbols $IMAGES_DIR/jdk "${JBR}_diz"
|
||||
fi
|
||||
|
||||
@@ -26,6 +26,11 @@ JCEF_PATH=${JCEF_PATH:=./jcef_mac}
|
||||
BOOT_JDK=${BOOT_JDK:=$(/usr/libexec/java_home -v 17)}
|
||||
|
||||
function do_configure {
|
||||
if [[ "${architecture}" == *aarch64* ]]; then
|
||||
ENABLE_CDS="--enable-cds=no"
|
||||
else
|
||||
ENABLE_CDS="--enable-cds=yes"
|
||||
fi
|
||||
sh configure \
|
||||
$WITH_DEBUG_LEVEL \
|
||||
--with-vendor-name="$VENDOR_NAME" \
|
||||
@@ -72,6 +77,7 @@ function create_image_bundle {
|
||||
sed 's/JBR/JBRSDK/g' $JRE_CONTENTS/Home/release > release
|
||||
mv release $JRE_CONTENTS/Home/release
|
||||
cp $IMAGES_DIR/jdk-bundle/jdk-$JBSDK_VERSION.jdk/Contents/Home/lib/src.zip $JRE_CONTENTS/Home/lib
|
||||
cp $IMAGES_DIR/jdk-bundle/jdk-$JBSDK_VERSION.jdk/Contents/Home/lib/server/*.jsa $JRE_CONTENTS/Home/lib/server
|
||||
copy_jmods "$__modules" "$__modules_path" "$JRE_CONTENTS"/Home/jmods
|
||||
zip_native_debug_symbols $IMAGES_DIR/jdk-bundle/jdk-$JBSDK_VERSION.jdk "${JBR}_diz"
|
||||
fi
|
||||
@@ -133,10 +139,18 @@ JSDK_MODS_DIR=$IMAGES_DIR/jmods
|
||||
JBRSDK_BUNDLE=jbrsdk
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
update_jsdk_mods "$JSDK" "$JCEF_PATH"/jmods "$JSDK"/jmods "$JSDK_MODS_DIR" || do_exit $?
|
||||
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not changed
|
||||
|
||||
if [ -d "$JCEF_PATH" ]; then
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
update_jsdk_mods "$JSDK" "$JCEF_PATH"/jmods "$JSDK"/jmods "$JSDK_MODS_DIR" || do_exit $?
|
||||
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not changed
|
||||
#JBR-5426 write JCEF version info inside release file
|
||||
else
|
||||
if [ "$bundle_type" == "jcef" ]; then
|
||||
echo "*** ERROR *** $JCEF_PATH not found" && do_exit 1
|
||||
else
|
||||
echo "*** WARNING *** $JCEF_PATH not found"
|
||||
fi
|
||||
fi
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
|
||||
@@ -75,6 +75,7 @@ function create_image_bundle {
|
||||
sed 's/JBR/JBRSDK/g' $__root_dir/release > release
|
||||
mv release $__root_dir/release
|
||||
cp $IMAGES_DIR/jdk/lib/src.zip $__root_dir/lib
|
||||
cp $IMAGES_DIR/jdk/bin/server/*.jsa $__root_dir/bin/server
|
||||
for dir in $(ls -d $IMAGES_DIR/jdk/*); do
|
||||
rsync -amv --include="*/" --include="*.pdb" --exclude="*" $dir $__root_dir
|
||||
done
|
||||
@@ -126,12 +127,19 @@ if [ $? -eq 0 ]; then
|
||||
fi
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module_aarch64.patch || do_exit $?
|
||||
update_jsdk_mods "$BUILD_JDK" "$JCEF_PATH"/jmods "$JSDK"/jmods "$JSDK_MODS_DIR" || do_exit $?
|
||||
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not unchanged
|
||||
|
||||
if [ -d "$JCEF_PATH" ]; then
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module_aarch64.patch || do_exit $?
|
||||
update_jsdk_mods "$BUILD_JDK" "$JCEF_PATH"/jmods "$JSDK"/jmods "$JSDK_MODS_DIR" || do_exit $?
|
||||
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not unchanged
|
||||
cat $JCEF_PATH/jcef.version >> $JSDK/release
|
||||
else
|
||||
if [ "$bundle_type" == "jcef" ]; then
|
||||
echo "*** ERROR *** $JCEF_PATH not found" && do_exit 1
|
||||
else
|
||||
echo "*** WARNING *** $JCEF_PATH not found"
|
||||
fi
|
||||
fi
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
cat $JCEF_PATH/jcef.version >> $JSDK/release
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
fi
|
||||
|
||||
@@ -66,6 +66,7 @@ function create_image_bundle {
|
||||
sed 's/JBR/JBRSDK/g' $__root_dir/release > release
|
||||
mv release $__root_dir/release
|
||||
cp $IMAGES_DIR/jdk/lib/src.zip $__root_dir/lib
|
||||
cp $IMAGES_DIR/jdk/bin/server/*.jsa $__root_dir/bin/server
|
||||
for dir in $(ls -d $IMAGES_DIR/jdk/*); do
|
||||
rsync -amv --include="*/" --include="*.pdb" --exclude="*" $dir $__root_dir
|
||||
done
|
||||
@@ -117,12 +118,19 @@ if [ $? -eq 0 ]; then
|
||||
fi
|
||||
|
||||
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "fd" ]; then
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
update_jsdk_mods "$JSDK" "$JCEF_PATH"/jmods "$JSDK"/jmods "$JSDK_MODS_DIR" || do_exit $?
|
||||
cp $JCEF_PATH/jmods/* ${JSDK_MODS_DIR} # $JSDK/jmods is not unchanged
|
||||
|
||||
if [ -d "$JCEF_PATH" ]; then
|
||||
git apply -p0 < jb/project/tools/patches/add_jcef_module.patch || do_exit $?
|
||||
update_jsdk_mods "$JSDK" "$JCEF_PATH"/jmods "$JSDK"/jmods "$JSDK_MODS_DIR" || do_exit $?
|
||||
cp $JCEF_PATH/jmods/* ${JSDK_MODS_DIR} # $JSDK/jmods is not unchanged
|
||||
cat $JCEF_PATH/jcef.version >> $JSDK/release
|
||||
else
|
||||
if [ "$bundle_type" == "jcef" ]; then
|
||||
echo "*** ERROR *** $JCEF_PATH not found" && do_exit 1
|
||||
else
|
||||
echo "*** WARNING *** $JCEF_PATH not found"
|
||||
fi
|
||||
fi
|
||||
jbr_name_postfix="_${bundle_type}"
|
||||
cat $JCEF_PATH/jcef.version >> $JSDK/release
|
||||
else
|
||||
jbr_name_postfix=""
|
||||
fi
|
||||
|
||||
@@ -62,6 +62,7 @@ function create_image_bundle {
|
||||
sed 's/JBR/JBRSDK/g' $__root_dir/release > release
|
||||
mv release $__root_dir/release
|
||||
cp $IMAGES_DIR/jdk/lib/src.zip $__root_dir/lib
|
||||
cp $IMAGES_DIR/jdk/bin/server/*.jsa $__root_dir/bin/server
|
||||
for dir in $(ls -d $IMAGES_DIR/jdk/*); do
|
||||
rsync -amv --include="*/" --include="*.pdb" --exclude="*" $dir $__root_dir
|
||||
done
|
||||
|
||||
@@ -364,7 +364,6 @@ ifeq ($(call isTargetOs, windows macosx), false)
|
||||
common/awt \
|
||||
common/java2d \
|
||||
common/font \
|
||||
common/wayland \
|
||||
#
|
||||
|
||||
LIBAWT_WLAWT_EXCLUDES := medialib debug opengl x11
|
||||
@@ -385,7 +384,6 @@ ifeq ($(call isTargetOs, windows macosx), false)
|
||||
common/font \
|
||||
common/java2d/wl \
|
||||
common/java2d/vulkan \
|
||||
common/wayland \
|
||||
libvmahpp \
|
||||
#
|
||||
|
||||
@@ -900,7 +898,6 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)
|
||||
#
|
||||
|
||||
LIBSPLASHSCREEN_HEADER_DIRS += common/awt/utility
|
||||
LIBSPLASHSCREEN_HEADER_DIRS += common/awt/systemscale
|
||||
|
||||
ifeq ($(USE_EXTERNAL_LIBGIF), false)
|
||||
LIBSPLASHSCREEN_HEADER_DIRS += libsplashscreen/giflib
|
||||
@@ -956,8 +953,6 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)
|
||||
endif
|
||||
endif
|
||||
|
||||
LIBSPLASHSCREEN_CFLAGS += $(CFLAGS_JDKLIB) $(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS) $(PNG_CFLAGS) $(LIBZ_CFLAGS)
|
||||
|
||||
ifeq ($(call isTargetOs, macosx), true)
|
||||
LIBSPLASHSCREEN_CFLAGS += -DWITH_MACOSX
|
||||
|
||||
@@ -972,10 +967,11 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)
|
||||
else ifeq ($(call isTargetOs, windows), true)
|
||||
LIBSPLASHSCREEN_CFLAGS += -DWITH_WIN32
|
||||
else
|
||||
LIBWLSPLASHSCREEN_CFLAGS := -DWITH_WL $(LIBSPLASHSCREEN_CFLAGS) $(X_CFLAGS)
|
||||
LIBSPLASHSCREEN_CFLAGS += -DWITH_X11 $(X_CFLAGS)
|
||||
endif
|
||||
|
||||
LIBSPLASHSCREEN_LIBS :=
|
||||
|
||||
ifeq ($(call isTargetOs, macosx), true)
|
||||
LIBSPLASHSCREEN_LIBS += \
|
||||
$(LIBM) -lpthread -liconv -losxapp \
|
||||
@@ -991,59 +987,48 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)
|
||||
endif
|
||||
|
||||
LIBSPLASHSCREEN_HEADER_DIRS += \
|
||||
libsplashscreen \
|
||||
libosxapp \
|
||||
java.base:libjava \
|
||||
#
|
||||
|
||||
LIBSPLASHSCREEN_EXCLUDE_FILES := imageioJPEG.c jpegdecoder.c pngtest.c
|
||||
LIBSPLASHSCREEN_LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN)
|
||||
LIBSPLASHSCREEN_LIBS := $(JDKLIB_LIBS) $(LIBSPLASHSCREEN_LIBS) $(LIBZ_LIBS) $(GIFLIB_LIBS) $(LIBJPEG_LIBS) $(PNG_LIBS)
|
||||
LIBSPLASHSCREEN_DISABLED_WARNINGS_gcc := sign-compare implicit-fallthrough shift-negative-value maybe-uninitialized unused-function type-limits unused-result
|
||||
LIBSPLASHSCREEN_DISABLED_WARNINGS_clang := deprecated-non-prototype format-nonliteral sign-compare incompatible-pointer-types deprecated-declarations
|
||||
LIBSPLASHSCREEN_DISABLED_WARNINGS_microsoft := 4018 4267 4244
|
||||
LIBWLSPLASHSCREEN_HEADER_DIRS := common/wayland
|
||||
LIBWLSPLASHSCREEN_EXTRA_SRC := common/wayland
|
||||
|
||||
$(eval $(call SetupJdkLibrary, BUILD_LIBSPLASHSCREEN, \
|
||||
NAME := splashscreen, \
|
||||
EXTRA_SRC := $(LIBSPLASHSCREEN_EXTRA_SRC) libxsplashscreen libsplashscreen, \
|
||||
EXTRA_SRC := $(LIBSPLASHSCREEN_EXTRA_SRC), \
|
||||
EXCLUDE_SRC_PATTERNS := $(LIBSPLASHSCREEN_EXCLUDE_SRC_PATTERNS), \
|
||||
DISABLED_WARNINGS_gcc := $(LIBSPLASHSCREEN_DISABLED_WARNINGS_gcc), \
|
||||
DISABLED_WARNINGS_clang := $(LIBSPLASHSCREEN_DISABLED_WARNINGS_clang), \
|
||||
DISABLED_WARNINGS_microsoft := $(LIBSPLASHSCREEN_DISABLED_WARNINGS_microsoft), \
|
||||
EXCLUDE_FILES := $(LIBSPLASHSCREEN_EXCLUDE_FILES), \
|
||||
EXCLUDE_FILES := imageioJPEG.c jpegdecoder.c pngtest.c, \
|
||||
EXCLUDES := $(LIBSPLASHSCREEN_EXCLUDES), \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(LIBSPLASHSCREEN_CFLAGS), \
|
||||
EXTRA_HEADER_DIRS := libxsplashscreen $(LIBSPLASHSCREEN_HEADER_DIRS), \
|
||||
LDFLAGS := $(LIBSPLASHSCREEN_LDFLAGS), \
|
||||
CFLAGS := $(CFLAGS_JDKLIB) $(LIBSPLASHSCREEN_CFLAGS) \
|
||||
$(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS) $(PNG_CFLAGS) $(LIBZ_CFLAGS), \
|
||||
EXTRA_HEADER_DIRS := $(LIBSPLASHSCREEN_HEADER_DIRS), \
|
||||
DISABLED_WARNINGS_gcc_dgif_lib.c := sign-compare, \
|
||||
DISABLED_WARNINGS_gcc_jcmaster.c := implicit-fallthrough, \
|
||||
DISABLED_WARNINGS_gcc_jdphuff.c := shift-negative-value, \
|
||||
DISABLED_WARNINGS_gcc_png.c := maybe-uninitialized, \
|
||||
DISABLED_WARNINGS_gcc_pngerror.c := maybe-uninitialized, \
|
||||
DISABLED_WARNINGS_gcc_splashscreen_gfx_impl.c := implicit-fallthrough maybe-uninitialized, \
|
||||
DISABLED_WARNINGS_gcc_splashscreen_impl.c := implicit-fallthrough sign-compare unused-function, \
|
||||
DISABLED_WARNINGS_gcc_splashscreen_sys.c := type-limits unused-result, \
|
||||
DISABLED_WARNINGS_clang := deprecated-non-prototype, \
|
||||
DISABLED_WARNINGS_clang_dgif_lib.c := sign-compare, \
|
||||
DISABLED_WARNINGS_clang_gzwrite.c := format-nonliteral, \
|
||||
DISABLED_WARNINGS_clang_splashscreen_impl.c := sign-compare, \
|
||||
DISABLED_WARNINGS_clang_splashscreen_png.c := incompatible-pointer-types, \
|
||||
DISABLED_WARNINGS_clang_splashscreen_sys.m := deprecated-declarations, \
|
||||
DISABLED_WARNINGS_microsoft_dgif_lib.c := 4018 4267, \
|
||||
DISABLED_WARNINGS_microsoft_splashscreen_impl.c := 4018 4267 4244, \
|
||||
DISABLED_WARNINGS_microsoft_splashscreen_png.c := 4267, \
|
||||
DISABLED_WARNINGS_microsoft_splashscreen_sys.c := 4267 4244, \
|
||||
LDFLAGS := $(LDFLAGS_JDKLIB) \
|
||||
$(call SET_SHARED_LIBRARY_ORIGIN), \
|
||||
LDFLAGS_macosx := -L$(INSTALL_LIBRARIES_HERE), \
|
||||
LDFLAGS_windows := -delayload:user32.dll, \
|
||||
LIBS := $(LIBSPLASHSCREEN_LIBS), \
|
||||
LIBS_aix := -liconv, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupJdkLibrary, BUILD_LIBWLSPLASHSCREEN, \
|
||||
NAME := wlsplashscreen, \
|
||||
EXTRA_SRC := $(LIBSPLASHSCREEN_EXTRA_SRC) $(LIBWLSPLASHSCREEN_EXTRA_SRC) libwlsplashscreen libsplashscreen, \
|
||||
EXCLUDE_SRC_PATTERNS := $(LIBSPLASHSCREEN_EXCLUDE_SRC_PATTERNS), \
|
||||
DISABLED_WARNINGS_gcc := $(LIBSPLASHSCREEN_DISABLED_WARNINGS_gcc), \
|
||||
DISABLED_WARNINGS_clang := $(LIBSPLASHSCREEN_DISABLED_WARNINGS_clang), \
|
||||
EXCLUDE_FILES := $(LIBSPLASHSCREEN_EXCLUDE_FILES), \
|
||||
EXCLUDES := $(LIBSPLASHSCREEN_EXCLUDES), \
|
||||
OPTIMIZATION := LOW, \
|
||||
CFLAGS := $(LIBWLSPLASHSCREEN_CFLAGS), \
|
||||
EXTRA_HEADER_DIRS := $(LIBSPLASHSCREEN_HEADER_DIRS) $(LIBWLSPLASHSCREEN_HEADER_DIRS) libwlsplashscreen, \
|
||||
LDFLAGS := $(LIBSPLASHSCREEN_LDFLAGS) -lrt, \
|
||||
LIBS := -lwayland-client -lwayland-cursor $(LIBSPLASHSCREEN_LIBS) -lrt, \
|
||||
LIBS := $(JDKLIB_LIBS) $(LIBSPLASHSCREEN_LIBS) $(LIBZ_LIBS) \
|
||||
$(GIFLIB_LIBS) $(LIBJPEG_LIBS) $(PNG_LIBS), \
|
||||
LIBS_aix := -liconv, \
|
||||
))
|
||||
|
||||
TARGETS += $(BUILD_LIBSPLASHSCREEN)
|
||||
ifeq ($(call isTargetOs, linux), true)
|
||||
TARGETS += $(BUILD_LIBWLSPLASHSCREEN)
|
||||
endif
|
||||
|
||||
ifeq ($(call isTargetOs, macosx), true)
|
||||
$(BUILD_LIBSPLASHSCREEN): $(call FindLib, $(MODULE), osxapp)
|
||||
|
||||
@@ -371,7 +371,7 @@ void mutex_init() {
|
||||
MUTEX_DEFL(JVMCI_lock , PaddedMonitor, JVMCIRuntime_lock);
|
||||
#endif
|
||||
|
||||
MUTEX_DEFN(OOMEStacks_lock , PaddedMutex , safepoint-1);
|
||||
MUTEX_DEFN(OOMEStacks_lock , PaddedMutex , safepoint);
|
||||
}
|
||||
|
||||
#undef MUTEX_DEFL
|
||||
|
||||
@@ -154,17 +154,6 @@
|
||||
/* Store the name of the executable once computed */
|
||||
static char *execname = NULL;
|
||||
|
||||
typedef enum awt_toolkit {
|
||||
TK_UNKNOWN = 0,
|
||||
TK_X11 = 1,
|
||||
TK_WAYLAND = 2
|
||||
} awt_toolkit;
|
||||
|
||||
// TODO when wayland support will be fully implemented change to TK_UNKNOWN
|
||||
// currently wayland support is not Production-Ready ready so default awt toolkit is X11
|
||||
// wayland could be chosen manually via passing -Dawt.toolkit.name=WLToolkit argument
|
||||
static awt_toolkit _awt_toolkit = TK_X11;
|
||||
|
||||
/*
|
||||
* execname accessor from other parts of platform dependent logic
|
||||
*/
|
||||
@@ -657,6 +646,7 @@ SetExecname(char **argv)
|
||||
}
|
||||
|
||||
/* --- Splash Screen shared library support --- */
|
||||
static const char* SPLASHSCREEN_SO = JNI_LIB_NAME("splashscreen");
|
||||
static void* hSplashLib = NULL;
|
||||
|
||||
void* SplashProcAddress(const char* name) {
|
||||
@@ -669,15 +659,8 @@ void* SplashProcAddress(const char* name) {
|
||||
JLI_ReportErrorMessage(JRE_ERROR1);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#if defined(__linux__)
|
||||
const char* splash_screen_so = _awt_toolkit == TK_WAYLAND ?
|
||||
JNI_LIB_NAME("wlsplashscreen") : JNI_LIB_NAME("splashscreen");
|
||||
#else
|
||||
const char* splash_screen_so = JNI_LIB_NAME("splashscreen");
|
||||
#endif
|
||||
ret = JLI_Snprintf(splashPath, sizeof(splashPath), "%s/lib/%s",
|
||||
jrePath, splash_screen_so);
|
||||
jrePath, SPLASHSCREEN_SO);
|
||||
|
||||
if (ret >= (int) sizeof(splashPath)) {
|
||||
JLI_ReportErrorMessage(JRE_ERROR11);
|
||||
@@ -764,34 +747,11 @@ CallJavaMainInNewThread(jlong stack_size, void* args) {
|
||||
/* Coarse estimation of number of digits assuming the worst case is a 64-bit pid. */
|
||||
#define MAX_PID_STR_SZ 20
|
||||
|
||||
static char*
|
||||
getToolkitNameByEnv() {
|
||||
if (_awt_toolkit == TK_UNKNOWN) {
|
||||
char *xdg_session_type = getenv("XDG_SESSION_TYPE");
|
||||
if (xdg_session_type != NULL && strcmp(xdg_session_type, "wayland") == 0) {
|
||||
_awt_toolkit = TK_WAYLAND;
|
||||
} else if (xdg_session_type != NULL && strcmp(xdg_session_type, "x11") == 0) {
|
||||
_awt_toolkit = TK_X11;
|
||||
} else if (getenv("DISPLAY") != NULL) {
|
||||
_awt_toolkit = TK_X11;
|
||||
} else if (getenv("WAYLAND_DISPLAY") != NULL) {
|
||||
_awt_toolkit = TK_WAYLAND;
|
||||
}
|
||||
}
|
||||
return _awt_toolkit == TK_WAYLAND ? "WLToolkit" : "XToolkit";
|
||||
}
|
||||
|
||||
int
|
||||
JVMInit(InvocationFunctions* ifn, jlong threadStackSize,
|
||||
int argc, char **argv,
|
||||
int mode, char *what, int ret)
|
||||
{
|
||||
char *toolkit_name = getToolkitNameByEnv();
|
||||
size_t toolkit_name_size = JLI_StrLen("-Dawt.toolkit.name=") + JLI_StrLen(toolkit_name) + 1;
|
||||
char *toolkit_option = (char *)JLI_MemAlloc(toolkit_name_size);
|
||||
snprintf(toolkit_option, toolkit_name_size, "-Dawt.toolkit.name=%s", toolkit_name);
|
||||
AddOption(toolkit_option, NULL);
|
||||
|
||||
ShowSplashScreen();
|
||||
return ContinueInNewThread(ifn, threadStackSize, argc, argv, mode, what, ret);
|
||||
}
|
||||
@@ -808,16 +768,11 @@ RegisterThread()
|
||||
// stubbed out for windows and *nixes.
|
||||
}
|
||||
|
||||
/*
|
||||
* on unix, we return a false to indicate this option is not applicable
|
||||
*/
|
||||
jboolean
|
||||
ProcessPlatformOption(const char *arg)
|
||||
{
|
||||
if (JLI_StrCCmp(arg, "-Dawt.toolkit.name=WLToolkit") == 0) {
|
||||
_awt_toolkit = TK_WAYLAND;
|
||||
return JNI_TRUE;
|
||||
} else if (JLI_StrCCmp(arg, "-Dawt.toolkit.name=XToolkit") == 0) {
|
||||
_awt_toolkit = TK_X11;
|
||||
return JNI_TRUE;
|
||||
}
|
||||
|
||||
return JNI_FALSE;
|
||||
}
|
||||
|
||||
@@ -92,14 +92,12 @@ public final class CGraphicsDevice extends GraphicsDevice
|
||||
}
|
||||
}
|
||||
|
||||
// [JBR] we don't call displayChanged after creating a device, so call it here.
|
||||
// initializes default device state, might be redundant step since we
|
||||
// call "displayChanged()" later anyway, but we do not want to leave the
|
||||
// device in an inconsistent state after construction
|
||||
displayChanged();
|
||||
}
|
||||
|
||||
int getDisplayID() {
|
||||
return displayID;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a list of all configurations.
|
||||
*/
|
||||
@@ -177,17 +175,6 @@ public final class CGraphicsDevice extends GraphicsDevice
|
||||
//TODO configs?
|
||||
}
|
||||
|
||||
/**
|
||||
* @return false if display parameters were changed, so we need to recreate the device.
|
||||
*/
|
||||
boolean updateDevice() {
|
||||
int s = scale;
|
||||
double xr = xResolution, yr = yResolution;
|
||||
var b = bounds;
|
||||
displayChanged();
|
||||
return s == scale && xr == xResolution && yr == yResolution && b.equals(bounds);
|
||||
}
|
||||
|
||||
public void displayParametersChanged() {
|
||||
Insets newScreenInsets = nativeGetScreenInsets(displayID);
|
||||
if (!newScreenInsets.equals(screenInsets)) {
|
||||
|
||||
@@ -175,8 +175,7 @@ public final class CGraphicsEnvironment extends SunGraphicsEnvironment {
|
||||
*/
|
||||
private void rebuildDevices() {
|
||||
initDevices();
|
||||
// Do not notify devices, this was already done in initDevices.
|
||||
displayChanger.notifyListeners();
|
||||
displayChanged();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -233,17 +232,8 @@ public final class CGraphicsEnvironment extends SunGraphicsEnvironment {
|
||||
displayIDs = new int[]{mainDisplayID};
|
||||
}
|
||||
for (int id : displayIDs) {
|
||||
old.compute(id, (i, d) -> {
|
||||
if (d != null && d.updateDevice()) {
|
||||
// Device didn't change -> reuse
|
||||
devices.put(i, d);
|
||||
return null;
|
||||
} else {
|
||||
// Device changed -> create new
|
||||
devices.put(i, new CGraphicsDevice(i));
|
||||
return d;
|
||||
}
|
||||
});
|
||||
devices.put(id, old.containsKey(id) ? old.remove(id)
|
||||
: new CGraphicsDevice(id));
|
||||
}
|
||||
// fetch the main display again, the old value might be outdated
|
||||
mainDisplayID = getMainDisplayID();
|
||||
@@ -279,12 +269,9 @@ public final class CGraphicsEnvironment extends SunGraphicsEnvironment {
|
||||
}
|
||||
|
||||
private CGraphicsDevice getSimilarDevice(CGraphicsDevice old) {
|
||||
CGraphicsDevice sameId = devices.get(old.getDisplayID());
|
||||
if (sameId != null) {
|
||||
return sameId;
|
||||
}
|
||||
for (CGraphicsDevice device : devices.values()) {
|
||||
if (device.getBounds().equals(old.getBounds())) {
|
||||
// for now we will use the bounds only
|
||||
return device;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,4 @@ public class PlatformGraphicsInfo {
|
||||
"but this program performed an operation which requires it.";
|
||||
}
|
||||
|
||||
public static String getSplashScreenLib() {
|
||||
return "splashscreen";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,6 @@ import javax.accessibility.AccessibleTable;
|
||||
import javax.accessibility.AccessibleText;
|
||||
import javax.accessibility.AccessibleValue;
|
||||
import javax.swing.Icon;
|
||||
import javax.swing.JComboBox;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JEditorPane;
|
||||
import javax.swing.JLabel;
|
||||
@@ -1139,18 +1138,4 @@ class CAccessibility implements PropertyChangeListener {
|
||||
}
|
||||
}, c);
|
||||
}
|
||||
|
||||
private static boolean isComboBoxEditable(Accessible a, Component c) {
|
||||
if (a == null) return false;
|
||||
|
||||
return invokeAndWait(new Callable<Boolean>() {
|
||||
public Boolean call() throws Exception {
|
||||
Accessible sa = CAccessible.getSwingAccessible(a);
|
||||
if (sa instanceof JComboBox<?> comboBox) {
|
||||
return comboBox.isEditable();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}, c);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,7 +87,6 @@ class CAccessible extends CFRetainedResource implements Accessible {
|
||||
private static native void treeNodeCollapsed(long ptr);
|
||||
private static native void selectedCellsChanged(long ptr);
|
||||
private static native void tableContentCacheClear(long ptr);
|
||||
private static native void updateZoomCaretFocus(long ptr);
|
||||
|
||||
private Accessible accessible;
|
||||
|
||||
@@ -133,8 +132,6 @@ class CAccessible extends CFRetainedResource implements Accessible {
|
||||
Object oldValue = e.getOldValue();
|
||||
if (name.equals(ACCESSIBLE_CARET_PROPERTY)) {
|
||||
execute(ptr -> selectedTextChanged(ptr));
|
||||
// Notify macOS Accessibility Zoom to move focus to the new caret location.
|
||||
execute(ptr -> updateZoomCaretFocus(ptr));
|
||||
} else if (name.equals(ACCESSIBLE_TEXT_PROPERTY)) {
|
||||
execute(ptr -> valueChanged(ptr));
|
||||
} else if (name.equals(ACCESSIBLE_SELECTION_PROPERTY)) {
|
||||
|
||||
@@ -29,7 +29,6 @@ import java.awt.Component;
|
||||
import java.awt.Point;
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.geom.Rectangle2D;
|
||||
import java.awt.im.InputMethodRequests;
|
||||
import java.util.concurrent.Callable;
|
||||
|
||||
import javax.accessibility.Accessible;
|
||||
@@ -344,33 +343,4 @@ class CAccessibleText {
|
||||
|
||||
return new int[] { line.getStartOffset(), line.getEndOffset() };
|
||||
}
|
||||
|
||||
static double[] getCaretRectangle(final Accessible a, final Component c) {
|
||||
final double[] ret = new double[4];
|
||||
|
||||
if (a == null) return null;
|
||||
|
||||
return CAccessibility.invokeAndWait(new Callable<double[]>() {
|
||||
public double[] call() throws Exception {
|
||||
final Accessible sa = CAccessible.getSwingAccessible(a);
|
||||
if (!(sa instanceof Component)) return null;
|
||||
|
||||
final Component component = (Component) sa;
|
||||
|
||||
final InputMethodRequests imr = component.getInputMethodRequests();
|
||||
if (imr == null) return null;
|
||||
|
||||
final Rectangle caretRectangle = imr.getTextLocation(null);
|
||||
|
||||
if (caretRectangle == null) return null;
|
||||
|
||||
ret[0] = caretRectangle.getX();
|
||||
ret[1] = caretRectangle.getY();
|
||||
ret[2] = 1; // Use 1 as caret width.
|
||||
ret[3] = caretRectangle.getHeight();
|
||||
|
||||
return ret;
|
||||
}
|
||||
}, c);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,7 +143,9 @@ public final class LWCToolkit extends LWToolkit {
|
||||
|
||||
private static native String[] getKeyboardLayoutListNative(boolean includeAll);
|
||||
|
||||
private static native boolean setKeyboardLayoutEnabledNative(String layoutName, boolean enabled);
|
||||
private static native boolean enableKeyboardLayoutNative(String layoutName);
|
||||
|
||||
private static native boolean disableKeyboardLayoutNative(String layoutName);
|
||||
|
||||
public static void switchKeyboardLayout (String layoutName) {
|
||||
if (layoutName == null || layoutName.isEmpty()) {
|
||||
@@ -170,7 +172,7 @@ public final class LWCToolkit extends LWToolkit {
|
||||
if (layoutName == null || layoutName.isEmpty()) {
|
||||
throw new RuntimeException("A valid layout ID is expected. Found: " + layoutName);
|
||||
}
|
||||
if (!setKeyboardLayoutEnabledNative(layoutName, true)) {
|
||||
if (!enableKeyboardLayoutNative(layoutName)) {
|
||||
throw new RuntimeException("Couldn't enable layout " + layoutName);
|
||||
}
|
||||
}
|
||||
@@ -179,7 +181,7 @@ public final class LWCToolkit extends LWToolkit {
|
||||
if (layoutName == null || layoutName.isEmpty()) {
|
||||
throw new RuntimeException("A valid layout ID is expected. Found: " + layoutName);
|
||||
}
|
||||
if (!setKeyboardLayoutEnabledNative(layoutName, false)) {
|
||||
if (!disableKeyboardLayoutNative(layoutName)) {
|
||||
throw new RuntimeException("Couldn't disable layout " + layoutName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -494,14 +494,6 @@ TISInputSourceRef GetCurrentUnderlyingLayout(BOOL useNationalLayouts) {
|
||||
CFBooleanGetValue((CFBooleanRef) TISGetInputSourceProperty(currentLayout, kTISPropertyInputSourceIsASCIICapable));
|
||||
TISInputSourceRef underlyingLayout = (!useNationalLayouts || currentAscii) ? currentLayout : nil;
|
||||
|
||||
if (currentLayout) {
|
||||
if (underlyingLayout) {
|
||||
CFAutorelease(currentLayout);
|
||||
} else {
|
||||
CFRelease(currentLayout);
|
||||
}
|
||||
}
|
||||
|
||||
return underlyingLayout;
|
||||
}
|
||||
|
||||
|
||||
@@ -938,18 +938,14 @@ Java_sun_lwawt_macosx_LWCToolkit_getMultiClickTime(JNIEnv *env, jclass klass) {
|
||||
*/
|
||||
JNIEXPORT jstring JNICALL
|
||||
JNICALL Java_sun_lwawt_macosx_LWCToolkit_getKeyboardLayoutNativeId(JNIEnv *env, jclass cls) {
|
||||
jstring jLayoutId = NULL;
|
||||
__block NSString * layoutId = NULL;
|
||||
JNI_COCOA_ENTER(env);
|
||||
__block CFStringRef layoutId = nil;
|
||||
[ThreadUtilities performOnMainThreadWaiting:YES block:^(){
|
||||
TISInputSourceRef source = TISCopyCurrentKeyboardInputSource();
|
||||
layoutId = (CFStringRef)CFRetain(TISGetInputSourceProperty(source, kTISPropertyInputSourceID));
|
||||
CFRelease(source);
|
||||
layoutId = TISGetInputSourceProperty(source, kTISPropertyInputSourceID);
|
||||
}];
|
||||
jLayoutId = NSStringToJavaString(env, (NSString*)layoutId);
|
||||
CFRelease(layoutId);
|
||||
JNI_COCOA_EXIT(env);
|
||||
return jLayoutId;
|
||||
return NSStringToJavaString(env, layoutId);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -959,31 +955,19 @@ JNICALL Java_sun_lwawt_macosx_LWCToolkit_getKeyboardLayoutNativeId(JNIEnv *env,
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL
|
||||
JNICALL Java_sun_lwawt_macosx_LWCToolkit_switchKeyboardLayoutNative(JNIEnv *env, jclass cls, jstring jLayoutId) {
|
||||
__block bool success = false;
|
||||
__block OSStatus status = noErr;
|
||||
JNI_COCOA_ENTER(env);
|
||||
__block NSString* layoutId = JavaStringToNSString(env, jLayoutId);
|
||||
[ThreadUtilities performOnMainThreadWaiting:YES block:^(){
|
||||
NSDictionary* searchParam = @{ (NSString*)kTISPropertyInputSourceID : layoutId };
|
||||
CFArrayRef sources = TISCreateInputSourceList((CFDictionaryRef)searchParam, NO);
|
||||
|
||||
if (CFArrayGetCount(sources) == 0) {
|
||||
NSLog(@"failed to switch to keyboard layout %@: no such layout", layoutId);
|
||||
CFRelease(sources);
|
||||
return;
|
||||
}
|
||||
|
||||
TISInputSourceRef source = (TISInputSourceRef)CFArrayGetValueAtIndex(sources, 0);
|
||||
OSStatus status = TISSelectInputSource(source);
|
||||
if (status == noErr) {
|
||||
success = true;
|
||||
} else {
|
||||
NSArray* sources = CFBridgingRelease(TISCreateInputSourceList((__bridge CFDictionaryRef)@{ (__bridge NSString*)kTISPropertyInputSourceID : layoutId }, FALSE));
|
||||
TISInputSourceRef source = (__bridge TISInputSourceRef)sources[0];
|
||||
status = TISSelectInputSource(source);
|
||||
if (status != noErr) {
|
||||
NSLog(@"failed to switch to keyboard layout %@, error code %d", layoutId, status);
|
||||
}
|
||||
|
||||
CFRelease(sources);
|
||||
}];
|
||||
JNI_COCOA_EXIT(env);
|
||||
return success;
|
||||
return status == noErr;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -993,66 +977,66 @@ JNICALL Java_sun_lwawt_macosx_LWCToolkit_switchKeyboardLayoutNative(JNIEnv *env,
|
||||
*/
|
||||
JNIEXPORT jarray JNICALL
|
||||
JNICALL Java_sun_lwawt_macosx_LWCToolkit_getKeyboardLayoutListNative(JNIEnv *env, jclass cls, jboolean includeAll) {
|
||||
__block jarray out = NULL;
|
||||
jclass stringClazz = (*env)->FindClass(env, "java/lang/String");
|
||||
jarray out = NULL;
|
||||
JNI_COCOA_ENTER(env);
|
||||
__block NSMutableArray* layoutIds = [[[NSMutableArray alloc] init] autorelease];
|
||||
[ThreadUtilities performOnMainThreadWaiting:YES block:^(){
|
||||
CFArrayRef sources = TISCreateInputSourceList(nil, includeAll);
|
||||
int numSources = CFArrayGetCount(sources);
|
||||
|
||||
for (int i = 0; i < numSources; ++i) {
|
||||
TISInputSourceRef layout = CFArrayGetValueAtIndex(sources, i);
|
||||
NSString* sourceId = TISGetInputSourceProperty(layout, kTISPropertyInputSourceID);
|
||||
[layoutIds addObject:sourceId];
|
||||
}
|
||||
|
||||
CFRelease(sources);
|
||||
}];
|
||||
|
||||
int numLayoutIds = (int)[layoutIds count];
|
||||
out = (*env)->NewObjectArray(env, numLayoutIds, stringClazz, NULL);
|
||||
for (int i = 0; i < numLayoutIds; ++i) {
|
||||
NSString* layoutId = [layoutIds objectAtIndex:i];
|
||||
jstring jLayoutId = NSStringToJavaString(env, layoutId);
|
||||
(*env)->SetObjectArrayElement(env, out, i, jLayoutId);
|
||||
[ThreadUtilities performOnMainThreadWaiting:YES block:^(){
|
||||
NSArray* sources = CFBridgingRelease(TISCreateInputSourceList(nil, includeAll));
|
||||
int numOfSources = (int)[sources count];
|
||||
out = (*env)->NewObjectArray(env, numOfSources, stringClazz, NULL);
|
||||
for (int i = 0; i < numOfSources; ++i) {
|
||||
id layout = [sources objectAtIndex:i];
|
||||
NSString* layoutId = TISGetInputSourceProperty((TISInputSourceRef)layout, kTISPropertyInputSourceID);
|
||||
jstring layoutIdJava = NSStringToJavaString(env, layoutId);
|
||||
(*env)->SetObjectArrayElement(env, out, i, layoutIdJava);
|
||||
}
|
||||
}];
|
||||
JNI_COCOA_EXIT(env);
|
||||
return out;
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: sun_lwawt_macosx_LWCToolkit
|
||||
* Method: setKeyboardLayoutEnabledNative
|
||||
* Signature: (Ljava/lang/String;Z)V
|
||||
* Method: enableKeyboardLayoutNative
|
||||
* Signature: (Ljava/lang/String;)V
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL
|
||||
JNICALL Java_sun_lwawt_macosx_LWCToolkit_setKeyboardLayoutEnabledNative(JNIEnv *env, jclass cls, jstring jLayoutId, jboolean enabled) {
|
||||
__block bool success = false;
|
||||
JNICALL Java_sun_lwawt_macosx_LWCToolkit_enableKeyboardLayoutNative(JNIEnv *env, jclass cls, jstring jLayoutId) {
|
||||
__block OSStatus status = noErr;
|
||||
JNI_COCOA_ENTER(env);
|
||||
__block NSString* layoutId = JavaStringToNSString(env, jLayoutId);
|
||||
[ThreadUtilities performOnMainThreadWaiting:YES block:^(){
|
||||
NSDictionary* searchParam = @{ (NSString*)kTISPropertyInputSourceID : layoutId };
|
||||
CFArrayRef sources = TISCreateInputSourceList((CFDictionaryRef)searchParam, YES);
|
||||
|
||||
if (CFArrayGetCount(sources) == 0) {
|
||||
NSLog(@"failed to set keyboard layout %@ enabled state: no such layout", layoutId);
|
||||
CFRelease(sources);
|
||||
return;
|
||||
NSArray* sources = CFBridgingRelease(TISCreateInputSourceList((__bridge CFDictionaryRef)@{ (__bridge NSString*)kTISPropertyInputSourceID : layoutId }, YES));
|
||||
TISInputSourceRef source = (__bridge TISInputSourceRef)sources[0];
|
||||
status = TISEnableInputSource(source);
|
||||
if (status != noErr) {
|
||||
NSLog(@"failed to enable keyboard layout %@, error code %d", layoutId, status);
|
||||
}
|
||||
|
||||
TISInputSourceRef source = (TISInputSourceRef)CFArrayGetValueAtIndex(sources, 0);
|
||||
OSStatus status = enabled ? TISEnableInputSource(source) : TISDisableInputSource(source);
|
||||
if (status == noErr) {
|
||||
success = true;
|
||||
} else {
|
||||
NSLog(@"failed to set keyboard layout %@ enabled state, error code %d", layoutId, status);
|
||||
}
|
||||
|
||||
CFRelease(sources);
|
||||
}];
|
||||
JNI_COCOA_EXIT(env);
|
||||
return success;
|
||||
return status == noErr;
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: sun_lwawt_macosx_LWCToolkit
|
||||
* Method: disableKeyboardLayoutNative
|
||||
* Signature: (Ljava/lang/String;)V
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL
|
||||
JNICALL Java_sun_lwawt_macosx_LWCToolkit_disableKeyboardLayoutNative(JNIEnv *env, jclass cls, jstring jLayoutId) {
|
||||
__block OSStatus status = noErr;
|
||||
JNI_COCOA_ENTER(env);
|
||||
__block NSString* layoutId = JavaStringToNSString(env, jLayoutId);
|
||||
[ThreadUtilities performOnMainThreadWaiting:YES block:^(){
|
||||
NSArray* sources = CFBridgingRelease(TISCreateInputSourceList((__bridge CFDictionaryRef)@{ (__bridge NSString*)kTISPropertyInputSourceID : layoutId }, YES));
|
||||
TISInputSourceRef source = (__bridge TISInputSourceRef)sources[0];
|
||||
status = TISDisableInputSource(source);
|
||||
if (status != noErr) {
|
||||
NSLog(@"failed to disable keyboard layout %@, error code %d", layoutId, status);
|
||||
}
|
||||
}];
|
||||
JNI_COCOA_EXIT(env);
|
||||
return status == noErr;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -57,18 +57,6 @@ static jmethodID sjm_getAccessibleName = NULL;
|
||||
return value;
|
||||
}
|
||||
|
||||
- (BOOL)isEditable
|
||||
{
|
||||
JNIEnv* env = [ThreadUtilities getJNIEnv];
|
||||
GET_CACCESSIBILITY_CLASS_RETURN(NO);
|
||||
DECLARE_STATIC_METHOD_RETURN(sjm_isComboBoxEditable, sjc_CAccessibility, "isComboBoxEditable", "(Ljavax/accessibility/Accessible;Ljava/awt/Component;)Z", NO);
|
||||
|
||||
BOOL isEditable = (*env)->CallStaticBooleanMethod(env, sjc_CAccessibility, sjm_isComboBoxEditable, fAccessible, fComponent);
|
||||
CHECK_EXCEPTION();
|
||||
|
||||
return isEditable;
|
||||
}
|
||||
|
||||
// NSAccessibilityElement protocol methods
|
||||
|
||||
- (id)accessibilityValue
|
||||
@@ -78,10 +66,12 @@ static jmethodID sjm_getAccessibleName = NULL;
|
||||
if (expanded) {
|
||||
return nil;
|
||||
}
|
||||
if (!expanded &&
|
||||
(value == nil)) {
|
||||
[self accessibleSelection];
|
||||
}
|
||||
|
||||
[self accessibleSelection];
|
||||
|
||||
return value != nil ? [value accessibilityLabel] : nil;
|
||||
return [value accessibilityLabel];
|
||||
}
|
||||
|
||||
- (NSArray *)accessibilitySelectedChildren
|
||||
@@ -89,13 +79,6 @@ static jmethodID sjm_getAccessibleName = NULL;
|
||||
return [NSArray arrayWithObject:[self accessibleSelection]];
|
||||
}
|
||||
|
||||
- (NSAccessibilityRole)accessibilityRole
|
||||
{
|
||||
return [self isEditable]
|
||||
? NSAccessibilityComboBoxRole
|
||||
: NSAccessibilityPopUpButtonRole;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
if (value != nil) {
|
||||
|
||||
@@ -306,49 +306,6 @@ static jmethodID sjm_getAccessibleEditableText = NULL;
|
||||
return [super accessibilityParent];
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Class: sun_lwawt_macosx_CAccessible
|
||||
* Method: updateZoomCaretFocus
|
||||
* Signature: (I)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CAccessible_updateZoomCaretFocus
|
||||
(JNIEnv *env, jclass jklass, jlong element)
|
||||
{
|
||||
if (!UAZoomEnabled()) return;
|
||||
|
||||
JNI_COCOA_ENTER(env);
|
||||
[ThreadUtilities performOnMainThread:@selector(postZoomChangeCaretFocus)
|
||||
on:(NavigableTextAccessibility *) jlong_to_ptr(element)
|
||||
withObject:nil
|
||||
waitUntilDone:NO];
|
||||
JNI_COCOA_EXIT(env);
|
||||
}
|
||||
|
||||
- (void)postZoomChangeCaretFocus
|
||||
{
|
||||
AWT_ASSERT_APPKIT_THREAD;
|
||||
|
||||
if (![self isEqual:[NSApp accessibilityFocusedUIElement]]) return;
|
||||
|
||||
JNIEnv *env = [ThreadUtilities getJNIEnv];
|
||||
|
||||
GET_CACCESSIBLETEXT_CLASS();
|
||||
DECLARE_STATIC_METHOD(jm_getCaretRectangle, sjc_CAccessibleText, "getCaretRectangle",
|
||||
"(Ljavax/accessibility/Accessible;Ljava/awt/Component;)[D");
|
||||
jdoubleArray axCaretBounds = (jdoubleArray) (*env)->CallStaticObjectMethod(env, sjc_CAccessibleText,
|
||||
jm_getCaretRectangle, fAccessible,
|
||||
fComponent);
|
||||
CHECK_EXCEPTION();
|
||||
if (axCaretBounds == NULL) return;
|
||||
|
||||
jdouble *values = (*env)->GetDoubleArrayElements(env, axCaretBounds, NULL);
|
||||
CGRect caretRect = CGRectMake(values[0], values[1], values[2], values[3]);
|
||||
(*env)->ReleaseDoubleArrayElements(env, axCaretBounds, values, JNI_ABORT);
|
||||
|
||||
UAZoomChangeFocus(&caretRect, &caretRect, kUAZoomFocusTypeInsertionPoint);
|
||||
}
|
||||
|
||||
/*
|
||||
* Other text methods
|
||||
- (NSRange)accessibilitySharedCharacterRange;
|
||||
|
||||
@@ -67,6 +67,8 @@
|
||||
@property (readwrite, retain) MTLPaint * paint;
|
||||
@property (readonly) MTLTransform * transform;
|
||||
@property (readonly) MTLClip * clip;
|
||||
@property (readonly) id syncEvent;
|
||||
@property (readwrite, atomic) UInt64 syncCount;
|
||||
|
||||
@property jint textureFunction;
|
||||
@property jboolean vertexCacheEnabled;
|
||||
|
||||
@@ -140,7 +140,8 @@ MTLTransform* tempTransform = nil;
|
||||
device, pipelineStateStorage,
|
||||
commandQueue, blitCommandQueue, vertexBuffer,
|
||||
texturePool, paint=_paint, encoderManager=_encoderManager,
|
||||
samplerManager=_samplerManager, stencilManager=_stencilManager;
|
||||
samplerManager=_samplerManager, stencilManager=_stencilManager,
|
||||
syncEvent, syncCount;
|
||||
|
||||
extern void initSamplers(id<MTLDevice> device);
|
||||
|
||||
@@ -190,6 +191,10 @@ extern void initSamplers(id<MTLDevice> device);
|
||||
CVDisplayLinkCreateWithCGDisplay(displayID, &_displayLink);
|
||||
CVDisplayLinkSetOutputCallback(_displayLink, &mtlDisplayLinkCallback, (__bridge void *) self);
|
||||
}
|
||||
if (@available(macOS 10.14, *)) {
|
||||
syncEvent = [device newEvent];
|
||||
}
|
||||
self.syncCount = 0;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@@ -259,6 +264,10 @@ extern void initSamplers(id<MTLDevice> device);
|
||||
_displayLink = NULL;
|
||||
}
|
||||
|
||||
if (@available(macOS 10.14, *)) {
|
||||
[syncEvent release];
|
||||
}
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
@@ -200,6 +200,10 @@ BOOL MTLLayer_isExtraRedrawEnabled() {
|
||||
}
|
||||
self.nextDrawableCount++;
|
||||
id<MTLCommandBuffer> renderBuffer = [self.ctx createCommandBuffer];
|
||||
self.ctx.syncCount++;
|
||||
if (@available(macOS 10.14, *)) {
|
||||
[renderBuffer encodeWaitForEvent:self.ctx.syncEvent value:self.ctx.syncCount];
|
||||
}
|
||||
|
||||
id <MTLBlitCommandEncoder> blitEncoder = [commandBuf blitCommandEncoder];
|
||||
|
||||
@@ -211,6 +215,10 @@ BOOL MTLLayer_isExtraRedrawEnabled() {
|
||||
destinationOrigin:MTLOriginMake(0, 0, 0)];
|
||||
[blitEncoder endEncoding];
|
||||
|
||||
if (@available(macOS 10.14, *)) {
|
||||
[commandBuf encodeSignalEvent:self.ctx.syncEvent value:self.ctx.syncCount];
|
||||
}
|
||||
|
||||
if (isDisplaySyncEnabled()) {
|
||||
[commandBuf presentDrawable:mtlDrawable];
|
||||
} else {
|
||||
|
||||
@@ -288,7 +288,7 @@ SplashRedrawWindow(Splash * splash) {
|
||||
[ThreadUtilities performOnMainThreadWaiting:YES block:^(){
|
||||
// drop the reference to the old view and image
|
||||
[splash->window setContentView: nil];
|
||||
SplashUpdateScreenData(splash, false);
|
||||
SplashUpdateScreenData(splash);
|
||||
|
||||
// NSDeviceRGBColorSpace vs. NSCalibratedRGBColorSpace ?
|
||||
NSBitmapImageRep * rep = [[NSBitmapImageRep alloc]
|
||||
|
||||
@@ -351,13 +351,6 @@ public abstract class Component implements ImageObserver, MenuContainer,
|
||||
*/
|
||||
private transient volatile GraphicsConfiguration graphicsConfig;
|
||||
|
||||
/**
|
||||
* Last observed value of {@code graphicsConfig.getDefaultTransform()}.
|
||||
* Used for firing 'graphicsContextScaleTransform' property change,
|
||||
* as values returned by {@link #graphicsConfig} may change over time.
|
||||
*/
|
||||
private transient volatile AffineTransform lastGraphicsConfigTransform;
|
||||
|
||||
/**
|
||||
* A reference to a {@code BufferStrategy} object
|
||||
* used to manipulate the buffers on this component.
|
||||
@@ -1214,17 +1207,13 @@ public abstract class Component implements ImageObserver, MenuContainer,
|
||||
return false;
|
||||
}
|
||||
|
||||
AffineTransform tx = lastGraphicsConfigTransform;
|
||||
AffineTransform tx = graphicsConfig != null ? graphicsConfig.getDefaultTransform() : new AffineTransform();
|
||||
AffineTransform newTx = gc != null ? gc.getDefaultTransform() : new AffineTransform();
|
||||
graphicsConfig = gc;
|
||||
// We cannot rely on graphicsConfig.getDefaultTransform(),
|
||||
// because its device might have been invalidated and now
|
||||
// reports different scale than it did before.
|
||||
if (!newTx.equals(lastGraphicsConfigTransform))
|
||||
if (tx.getScaleX() != newTx.getScaleX() ||
|
||||
tx.getScaleY() != newTx.getScaleY())
|
||||
{
|
||||
lastGraphicsConfigTransform = newTx;
|
||||
firePropertyChange("graphicsContextScaleTransform",
|
||||
tx != null ? tx : new AffineTransform(), newTx);
|
||||
firePropertyChange("graphicsContextScaleTransform", tx, newTx);
|
||||
}
|
||||
|
||||
ComponentPeer peer = this.peer;
|
||||
|
||||
@@ -31,7 +31,6 @@ import java.io.Serial;
|
||||
import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
||||
import java.security.PrivilegedExceptionAction;
|
||||
import java.util.HashMap;
|
||||
import java.util.Hashtable;
|
||||
import java.util.Properties;
|
||||
import java.util.StringTokenizer;
|
||||
@@ -193,23 +192,11 @@ public class Cursor implements java.io.Serializable {
|
||||
|
||||
AWTAccessor.setCursorAccessor(
|
||||
new AWTAccessor.CursorAccessor() {
|
||||
private final HashMap<Integer, Integer> actualCursorScale = new HashMap<>();
|
||||
|
||||
public long getPData(Cursor cursor, int scale) {
|
||||
return (actualCursorScale.getOrDefault(cursor.getType(), 0) == scale) ? cursor.pData : 0;
|
||||
}
|
||||
|
||||
public long getPData(Cursor cursor) {
|
||||
return cursor.pData;
|
||||
}
|
||||
|
||||
public void setPData(Cursor cursor, int scale, long pData) {
|
||||
actualCursorScale.put(cursor.getType(), scale);
|
||||
cursor.pData = pData;
|
||||
}
|
||||
|
||||
public void setPData(Cursor cursor, long pData) {
|
||||
actualCursorScale.remove(cursor.getType());
|
||||
cursor.pData = pData;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@ import java.awt.image.*;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.io.File;
|
||||
import sun.awt.PlatformGraphicsInfo;
|
||||
import sun.util.logging.PlatformLogger;
|
||||
import sun.awt.image.SunWritableRaster;
|
||||
|
||||
@@ -133,7 +132,7 @@ public final class SplashScreen {
|
||||
java.security.AccessController.doPrivileged(
|
||||
new java.security.PrivilegedAction<Void>() {
|
||||
public Void run() {
|
||||
System.loadLibrary(PlatformGraphicsInfo.getSplashScreenLib());
|
||||
System.loadLibrary("splashscreen");
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -633,21 +633,11 @@ public final class AWTAccessor {
|
||||
* An accessor for the Cursor class
|
||||
*/
|
||||
public interface CursorAccessor {
|
||||
/**
|
||||
* Returns pData of the Cursor class according to scale or 0 otherwise
|
||||
*/
|
||||
long getPData(Cursor cursor, int scale);
|
||||
|
||||
/**
|
||||
* Returns pData of the Cursor class
|
||||
*/
|
||||
long getPData(Cursor cursor);
|
||||
|
||||
/**
|
||||
* Sets pData to the Cursor class according to scale
|
||||
*/
|
||||
void setPData(Cursor cursor, int scale, long pData);
|
||||
|
||||
/**
|
||||
* Sets pData to the Cursor class
|
||||
*/
|
||||
|
||||
@@ -29,10 +29,6 @@
|
||||
/* splashscreen_gfx is a general purpose code for converting pixmaps between various visuals
|
||||
it is not very effective, but is universal and concise */
|
||||
|
||||
#if !defined(WITH_WIN32)
|
||||
#include "splashscreen_config_common.h"
|
||||
#endif
|
||||
|
||||
#include "splashscreen_config.h"
|
||||
|
||||
enum
|
||||
|
||||
@@ -25,8 +25,6 @@
|
||||
|
||||
#include "splashscreen_gfx_impl.h"
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
/* *INDENT-OFF* */
|
||||
const byte_t baseDitherMatrix[DITHER_SIZE][DITHER_SIZE] = {
|
||||
/* Bayer's order-4 dither array. Generated by the code given in
|
||||
|
||||
@@ -132,7 +132,7 @@ SplashIsStillLooping(Splash * splash)
|
||||
}
|
||||
|
||||
void
|
||||
SplashUpdateScreenData(Splash * splash, bool reuseScreenData)
|
||||
SplashUpdateScreenData(Splash * splash)
|
||||
{
|
||||
ImageRect srcRect, dstRect;
|
||||
if (splash->currentFrame < 0) {
|
||||
@@ -142,7 +142,7 @@ SplashUpdateScreenData(Splash * splash, bool reuseScreenData)
|
||||
initRect(&srcRect, 0, 0, splash->width, splash->height, 1,
|
||||
splash->width * sizeof(rgbquad_t),
|
||||
splash->frames[splash->currentFrame].bitmapBits, &splash->imageFormat);
|
||||
if (splash->screenData && !reuseScreenData) {
|
||||
if (splash->screenData) {
|
||||
free(splash->screenData);
|
||||
}
|
||||
splash->screenStride = splash->width * splash->screenFormat.depthBytes;
|
||||
@@ -151,9 +151,7 @@ SplashUpdateScreenData(Splash * splash, bool reuseScreenData)
|
||||
(splash->screenStride + splash->byteAlignment - 1) &
|
||||
~(splash->byteAlignment - 1);
|
||||
}
|
||||
if (!reuseScreenData) {
|
||||
splash->screenData = malloc(splash->height * splash->screenStride);
|
||||
}
|
||||
splash->screenData = malloc(splash->height * splash->screenStride);
|
||||
initRect(&dstRect, 0, 0, splash->width, splash->height, 1,
|
||||
splash->screenStride, splash->screenData, &splash->screenFormat);
|
||||
if (splash->overlayData) {
|
||||
|
||||
@@ -26,19 +26,10 @@
|
||||
#ifndef SPLASHSCREEN_IMPL_H
|
||||
#define SPLASHSCREEN_IMPL_H
|
||||
|
||||
#if !defined(WITH_WIN32)
|
||||
#include "splashscreen_config_common.h"
|
||||
#include "systemScale.h"
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
|
||||
#include "splashscreen_config.h"
|
||||
#include "splashscreen_gfx.h"
|
||||
#include "jni.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
JNIEXPORT int
|
||||
SplashLoadMemory(void *pdata, int size); /* requires preloading the file */
|
||||
|
||||
@@ -77,12 +68,6 @@ typedef struct SplashImage
|
||||
|
||||
#define SPLASH_COLOR_MAP_SIZE 0x100
|
||||
|
||||
typedef struct ScreenInfo {
|
||||
int width;
|
||||
int height;
|
||||
int scale;
|
||||
} ScreenInfo;
|
||||
|
||||
typedef struct Splash
|
||||
{
|
||||
ImageFormat screenFormat; /* must be preset before image decoding */
|
||||
@@ -101,7 +86,6 @@ typedef struct Splash
|
||||
ImageFormat overlayFormat;
|
||||
void *screenData;
|
||||
int screenStride; /* stored scanline length in bytes */
|
||||
ScreenInfo screenInfo;
|
||||
int currentFrame; // currentFrame==-1 means image is not loaded
|
||||
int loopCount;
|
||||
int x, y;
|
||||
@@ -127,15 +111,6 @@ typedef struct Splash
|
||||
pthread_mutex_t lock;
|
||||
Cursor cursor;
|
||||
XWMHints* wmHints;
|
||||
#elif defined(WITH_WL)
|
||||
int controlpipe[2];
|
||||
Buffer main_buffer;
|
||||
Buffer *buffers;
|
||||
wayland_state *state;
|
||||
int window_width;
|
||||
int window_height;
|
||||
int native_scale;
|
||||
pthread_mutex_t lock;
|
||||
#elif defined(WITH_MACOSX)
|
||||
pthread_mutex_t lock;
|
||||
int controlpipe[2];
|
||||
@@ -176,7 +151,7 @@ void SplashNextFrame(Splash * splash);
|
||||
void SplashStart(Splash * splash);
|
||||
void SplashDone(Splash * splash);
|
||||
|
||||
void SplashUpdateScreenData(Splash * splash, bool reuseData);
|
||||
void SplashUpdateScreenData(Splash * splash);
|
||||
|
||||
void SplashCleanup(Splash * splash);
|
||||
|
||||
|
||||
@@ -115,18 +115,6 @@
|
||||
<arg name="amount" type="int" />
|
||||
</request>
|
||||
|
||||
<request name="set_xkb_rule_names">
|
||||
<description summary="facilitates switching keyboard layouts">
|
||||
This requests the compositor to load the specified XKB layout and use it in all
|
||||
further keyboard handling.
|
||||
</description>
|
||||
<arg name="rules" type="string" />
|
||||
<arg name="model" type="string" />
|
||||
<arg name="layout" type="string" />
|
||||
<arg name="variant" type="string" />
|
||||
<arg name="options" type="string" />
|
||||
</request>
|
||||
|
||||
<enum name="error">
|
||||
<entry name="no_error" value="0" summary="error code 0 reserved for the absence of error"/>
|
||||
<entry name="invalid_coordinates" value="1" summary="supplied absolute coordinates point
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
#include <weston/weston.h>
|
||||
#include <libweston/weston-log.h>
|
||||
#include <xkbcommon/xkbcommon.h>
|
||||
|
||||
#include <pixman.h>
|
||||
#include <assert.h>
|
||||
@@ -75,12 +74,10 @@ notify_motion_absolute(struct weston_seat *seat, const struct timespec *time,
|
||||
void
|
||||
notify_pointer_frame(struct weston_seat *seat);
|
||||
|
||||
int
|
||||
weston_seat_update_keymap(struct weston_seat *seat, struct xkb_keymap *keymap);
|
||||
|
||||
|
||||
static struct weston_output *
|
||||
get_output_for_point(struct wakefield *wakefield, int32_t x, int32_t y) {
|
||||
static struct weston_output*
|
||||
get_output_for_point(struct wakefield* wakefield, int32_t x, int32_t y)
|
||||
{
|
||||
struct weston_output *o;
|
||||
wl_list_for_each(o, &wakefield->compositor->output_list, link) {
|
||||
if (o->destroying)
|
||||
@@ -98,7 +95,8 @@ static void
|
||||
wakefield_get_pixel_color(struct wl_client *client,
|
||||
struct wl_resource *resource,
|
||||
int32_t x,
|
||||
int32_t y) {
|
||||
int32_t y)
|
||||
{
|
||||
struct wakefield *wakefield = wl_resource_get_user_data(resource);
|
||||
struct weston_compositor *compositor = wakefield->compositor;
|
||||
|
||||
@@ -123,7 +121,7 @@ wakefield_get_pixel_color(struct wl_client *client,
|
||||
wakefield_send_pixel_color(resource, x, y, 0, WAKEFIELD_ERROR_INVALID_COORDINATES);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
const int output_x = x - output->x;
|
||||
const int output_y = y - output->y;
|
||||
weston_log_scope_printf(wakefield->log,
|
||||
@@ -156,7 +154,8 @@ wakefield_get_pixel_color(struct wl_client *client,
|
||||
static void
|
||||
wakefield_get_surface_location(struct wl_client *client,
|
||||
struct wl_resource *resource,
|
||||
struct wl_resource *surface_resource) {
|
||||
struct wl_resource *surface_resource)
|
||||
{
|
||||
// See also weston-test.c`move_surface() and the corresponding protocol
|
||||
|
||||
struct wakefield *wakefield = wl_resource_get_user_data(resource);
|
||||
@@ -173,8 +172,8 @@ wakefield_get_surface_location(struct wl_client *client,
|
||||
float fx;
|
||||
float fy;
|
||||
weston_view_to_global_float(view, 0, 0, &fx, &fy);
|
||||
const int32_t x = (int32_t) fx;
|
||||
const int32_t y = (int32_t) fy;
|
||||
const int32_t x = (int32_t)fx;
|
||||
const int32_t y = (int32_t)fy;
|
||||
weston_log_scope_printf(wakefield->log, "WAKEFIELD: get_location: %d, %d\n", x, y);
|
||||
|
||||
wakefield_send_surface_location(resource, surface_resource, x, y,
|
||||
@@ -186,7 +185,8 @@ wakefield_move_surface(struct wl_client *client,
|
||||
struct wl_resource *resource,
|
||||
struct wl_resource *surface_resource,
|
||||
int32_t x,
|
||||
int32_t y) {
|
||||
int32_t y)
|
||||
{
|
||||
struct wakefield *wakefield = wl_resource_get_user_data(resource);
|
||||
struct weston_surface *surface = wl_resource_get_user_data(surface_resource);
|
||||
struct weston_view *view = container_of(surface->views.next, struct weston_view, surface_link);
|
||||
@@ -196,14 +196,15 @@ wakefield_move_surface(struct wl_client *client,
|
||||
return;
|
||||
}
|
||||
|
||||
weston_view_set_position(view, (float) x, (float) y);
|
||||
weston_view_set_position(view, (float)x, (float)y);
|
||||
weston_view_update_transform(view);
|
||||
|
||||
weston_log_scope_printf(wakefield->log, "WAKEFIELD: move_surface to (%d, %d)\n", x, y);
|
||||
}
|
||||
|
||||
static pixman_format_code_t
|
||||
wl_shm_format_to_pixman(uint32_t wl_shm_format) {
|
||||
wl_shm_format_to_pixman(uint32_t wl_shm_format)
|
||||
{
|
||||
pixman_format_code_t rc;
|
||||
|
||||
switch (wl_shm_format) {
|
||||
@@ -224,12 +225,13 @@ wl_shm_format_to_pixman(uint32_t wl_shm_format) {
|
||||
* Returns the number of pixels in the given non-empty region.
|
||||
*/
|
||||
static uint64_t
|
||||
size_in_pixels(pixman_region32_t *region) {
|
||||
const pixman_box32_t *const e = pixman_region32_extents(region);
|
||||
size_in_pixels(pixman_region32_t *region)
|
||||
{
|
||||
const pixman_box32_t * const e = pixman_region32_extents(region);
|
||||
assert (e->x2 >= e->x1);
|
||||
assert (e->y2 >= e->y1);
|
||||
|
||||
return ((uint64_t) (e->x2 - e->x1)) * (e->y2 - e->y1);
|
||||
return ((uint64_t)(e->x2 - e->x1))*(e->y2 - e->y1);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -240,7 +242,8 @@ size_in_pixels(pixman_region32_t *region) {
|
||||
* @return largest area size in pixels (could be zero).
|
||||
*/
|
||||
static uint64_t
|
||||
get_largest_area_in_one_output(struct weston_compositor *compositor, pixman_region32_t *region, bool *fits_entirely) {
|
||||
get_largest_area_in_one_output(struct weston_compositor *compositor, pixman_region32_t *region, bool *fits_entirely)
|
||||
{
|
||||
uint64_t area = 0; // in pixels
|
||||
*fits_entirely = false;
|
||||
|
||||
@@ -274,10 +277,11 @@ get_largest_area_in_one_output(struct weston_compositor *compositor, pixman_regi
|
||||
* Sets every pixel in the given buffer to 0.
|
||||
*/
|
||||
static void
|
||||
clear_buffer(struct wl_shm_buffer *buffer) {
|
||||
const int32_t height = wl_shm_buffer_get_height(buffer);
|
||||
const size_t stride = wl_shm_buffer_get_stride(buffer);
|
||||
const size_t buffer_byte_size = height * stride;
|
||||
clear_buffer(struct wl_shm_buffer *buffer)
|
||||
{
|
||||
const int32_t height = wl_shm_buffer_get_height(buffer);
|
||||
const size_t stride = wl_shm_buffer_get_stride(buffer);
|
||||
const size_t buffer_byte_size = height*stride;
|
||||
|
||||
wl_shm_buffer_begin_access(buffer);
|
||||
{
|
||||
@@ -303,7 +307,8 @@ clear_buffer(struct wl_shm_buffer *buffer) {
|
||||
static void
|
||||
copy_pixels_to_shm_buffer(struct wl_shm_buffer *buffer, uint32_t *data,
|
||||
int32_t target_x, int32_t target_y,
|
||||
int32_t width, int32_t height) {
|
||||
int32_t width, int32_t height)
|
||||
{
|
||||
assert (target_x >= 0 && target_y >= 0);
|
||||
assert (data);
|
||||
|
||||
@@ -311,12 +316,12 @@ copy_pixels_to_shm_buffer(struct wl_shm_buffer *buffer, uint32_t *data,
|
||||
|
||||
wl_shm_buffer_begin_access(buffer);
|
||||
{
|
||||
uint32_t *const buffer_data = wl_shm_buffer_get_data(buffer);
|
||||
uint32_t * const buffer_data = wl_shm_buffer_get_data(buffer);
|
||||
assert (buffer_data);
|
||||
|
||||
for (int32_t y = 0; y < height; y++) {
|
||||
const uint32_t *const src_line = &data[y * width];
|
||||
uint32_t *const dst_line = &buffer_data[(target_y + y) * buffer_width];
|
||||
const uint32_t * const src_line = &data[y*width];
|
||||
uint32_t * const dst_line = &buffer_data[(target_y + y)*buffer_width];
|
||||
for (int32_t x = 0; x < width; x++) {
|
||||
dst_line[target_x + x] = src_line[x];
|
||||
}
|
||||
@@ -331,7 +336,8 @@ copy_pixels_to_shm_buffer(struct wl_shm_buffer *buffer, uint32_t *data,
|
||||
*/
|
||||
static bool
|
||||
check_buffer_format_supported(struct wakefield *wakefield, struct wl_resource *resource,
|
||||
struct wl_resource *buffer_resource, uint32_t buffer_format) {
|
||||
struct wl_resource *buffer_resource, uint32_t buffer_format)
|
||||
{
|
||||
if (buffer_format != WL_SHM_FORMAT_ARGB8888
|
||||
&& buffer_format != WL_SHM_FORMAT_XRGB8888) {
|
||||
weston_log_scope_printf(wakefield->log,
|
||||
@@ -351,7 +357,8 @@ check_buffer_format_supported(struct wakefield *wakefield, struct wl_resource *r
|
||||
*/
|
||||
static bool
|
||||
check_buffer_type_supported(struct wakefield *wakefield, struct wl_resource *resource,
|
||||
struct wl_resource *buffer_resource) {
|
||||
struct wl_resource *buffer_resource)
|
||||
{
|
||||
struct wl_shm_buffer *buffer = wl_shm_buffer_get(buffer_resource);
|
||||
|
||||
if (!buffer) {
|
||||
@@ -369,7 +376,8 @@ check_buffer_type_supported(struct wakefield *wakefield, struct wl_resource *res
|
||||
*/
|
||||
static bool
|
||||
capture_is_empty(struct wakefield *wakefield, struct wl_resource *resource,
|
||||
struct wl_resource *buffer_resource, uint64_t largest_capture_area) {
|
||||
struct wl_resource *buffer_resource, uint64_t largest_capture_area)
|
||||
{
|
||||
if (largest_capture_area == 0) {
|
||||
// All outputs might've just disappeared
|
||||
weston_log_scope_printf(wakefield->log,
|
||||
@@ -386,7 +394,8 @@ wakefield_capture_create(struct wl_client *client,
|
||||
struct wl_resource *resource,
|
||||
struct wl_resource *buffer_resource,
|
||||
int32_t x,
|
||||
int32_t y) {
|
||||
int32_t y)
|
||||
{
|
||||
struct wakefield *wakefield = wl_resource_get_user_data(resource);
|
||||
|
||||
if (!check_buffer_type_supported(wakefield, resource, buffer_resource)) {
|
||||
@@ -402,7 +411,7 @@ wakefield_capture_create(struct wl_client *client,
|
||||
|
||||
clear_buffer(buffer); // in case some outputs disappear mid-flight or a part of the capture is out of screen
|
||||
|
||||
const int32_t width = wl_shm_buffer_get_width(buffer);
|
||||
const int32_t width = wl_shm_buffer_get_width(buffer);
|
||||
const int32_t height = wl_shm_buffer_get_height(buffer);
|
||||
|
||||
pixman_region32_t region_global; // capture region in global coordinates
|
||||
@@ -412,8 +421,7 @@ wakefield_capture_create(struct wl_client *client,
|
||||
pixman_region32_init(®ion_in_output);
|
||||
|
||||
bool fits_entirely;
|
||||
const uint64_t largest_capture_area = get_largest_area_in_one_output(wakefield->compositor, ®ion_global,
|
||||
&fits_entirely);
|
||||
const uint64_t largest_capture_area = get_largest_area_in_one_output(wakefield->compositor, ®ion_global, &fits_entirely);
|
||||
if (capture_is_empty(wakefield, resource, buffer_resource, largest_capture_area)) {
|
||||
return;
|
||||
}
|
||||
@@ -440,14 +448,13 @@ wakefield_capture_create(struct wl_client *client,
|
||||
|
||||
pixman_region32_intersect(®ion_in_output, ®ion_global, &output->region);
|
||||
if (pixman_region32_not_empty(®ion_in_output)) {
|
||||
const pixman_box32_t *const e = pixman_region32_extents(®ion_in_output);
|
||||
const pixman_box32_t * const e = pixman_region32_extents(®ion_in_output);
|
||||
|
||||
const int32_t region_x_in_global = e->x1;
|
||||
const int32_t region_y_in_global = e->y1;
|
||||
const int32_t width_in_output = e->x2 - e->x1;
|
||||
const int32_t height_in_output = e->y2 - e->y1;
|
||||
weston_log_scope_printf(wakefield->log,
|
||||
"WAKEFIELD: output '%s' has a chunk of the image at (%d, %d) sized (%d, %d)\n",
|
||||
const int32_t width_in_output = e->x2 - e->x1;
|
||||
const int32_t height_in_output = e->y2 - e->y1;
|
||||
weston_log_scope_printf(wakefield->log, "WAKEFIELD: output '%s' has a chunk of the image at (%d, %d) sized (%d, %d)\n",
|
||||
output->name,
|
||||
e->x1, e->y1,
|
||||
width_in_output, height_in_output);
|
||||
@@ -458,7 +465,7 @@ wakefield_capture_create(struct wl_client *client,
|
||||
// Now convert region_in_output from global to output-local coordinates.
|
||||
pixman_region32_translate(®ion_in_output, -output->x, -output->y);
|
||||
|
||||
const pixman_box32_t *const e_in_output = pixman_region32_extents(®ion_in_output);
|
||||
const pixman_box32_t * const e_in_output = pixman_region32_extents(®ion_in_output);
|
||||
const int32_t x_in_output = e_in_output->x1;
|
||||
const int32_t y_in_output = e_in_output->y1;
|
||||
|
||||
@@ -510,7 +517,8 @@ static void
|
||||
wakefield_send_key(struct wl_client *client,
|
||||
struct wl_resource *resource,
|
||||
uint32_t key,
|
||||
uint32_t state) {
|
||||
uint32_t state)
|
||||
{
|
||||
struct wakefield *wakefield = wl_resource_get_user_data(resource);
|
||||
struct weston_compositor *compositor = wakefield->compositor;
|
||||
|
||||
@@ -526,9 +534,10 @@ wakefield_send_key(struct wl_client *client,
|
||||
}
|
||||
}
|
||||
|
||||
static void wakefield_send_cursor(struct wl_client *client,
|
||||
struct wl_resource *resource,
|
||||
int32_t x, int32_t y) {
|
||||
static void wakefield_send_cursor(struct wl_client* client,
|
||||
struct wl_resource* resource,
|
||||
int32_t x, int32_t y)
|
||||
{
|
||||
struct wakefield *wakefield = wl_resource_get_user_data(resource);
|
||||
struct weston_compositor *compositor = wakefield->compositor;
|
||||
|
||||
@@ -537,15 +546,16 @@ static void wakefield_send_cursor(struct wl_client *client,
|
||||
|
||||
struct weston_seat *seat;
|
||||
wl_list_for_each(seat, &compositor->seat_list, link) {
|
||||
notify_motion_absolute(seat, &time, (double) x, (double) y);
|
||||
notify_motion_absolute(seat, &time, (double)x, (double)y);
|
||||
notify_pointer_frame(seat);
|
||||
}
|
||||
}
|
||||
|
||||
static void wakefield_send_button(struct wl_client *client,
|
||||
struct wl_resource *resource,
|
||||
static void wakefield_send_button(struct wl_client* client,
|
||||
struct wl_resource* resource,
|
||||
uint32_t button,
|
||||
uint32_t state) {
|
||||
uint32_t state)
|
||||
{
|
||||
struct wakefield *wakefield = wl_resource_get_user_data(resource);
|
||||
struct weston_compositor *compositor = wakefield->compositor;
|
||||
|
||||
@@ -554,15 +564,16 @@ static void wakefield_send_button(struct wl_client *client,
|
||||
|
||||
struct weston_seat *seat;
|
||||
wl_list_for_each(seat, &compositor->seat_list, link) {
|
||||
notify_button(seat, &time, (int32_t) button,
|
||||
notify_button(seat, &time, (int32_t)button,
|
||||
state ? WL_POINTER_BUTTON_STATE_PRESSED : WL_POINTER_BUTTON_STATE_RELEASED);
|
||||
notify_pointer_frame(seat);
|
||||
}
|
||||
}
|
||||
|
||||
static void wakefield_send_wheel(struct wl_client *client,
|
||||
struct wl_resource *resource,
|
||||
int32_t amount) {
|
||||
static void wakefield_send_wheel(struct wl_client* client,
|
||||
struct wl_resource* resource,
|
||||
int32_t amount)
|
||||
{
|
||||
struct wakefield *wakefield = wl_resource_get_user_data(resource);
|
||||
struct weston_compositor *compositor = wakefield->compositor;
|
||||
|
||||
@@ -583,40 +594,6 @@ static void wakefield_send_wheel(struct wl_client *client,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
wakefield_set_xkb_rule_names(struct wl_client *client,
|
||||
struct wl_resource *resource,
|
||||
const char *rules,
|
||||
const char *model,
|
||||
const char *layout,
|
||||
const char *variant,
|
||||
const char *options)
|
||||
{
|
||||
struct wakefield *wakefield = wl_resource_get_user_data(resource);
|
||||
struct weston_compositor *compositor = wakefield->compositor;
|
||||
|
||||
struct xkb_rule_names rule_names = {
|
||||
.rules = rules,
|
||||
.model = model,
|
||||
.layout = layout,
|
||||
.variant = variant,
|
||||
.options = options
|
||||
};
|
||||
|
||||
weston_compositor_set_xkb_rule_names(compositor, &rule_names);
|
||||
|
||||
struct xkb_keymap* keymap = xkb_keymap_new_from_names(compositor->xkb_context, &compositor->xkb_names, XKB_KEYMAP_COMPILE_NO_FLAGS);
|
||||
if (!keymap) {
|
||||
weston_log_scope_printf(wakefield->log, "WAKEFIELD: failed to create xkb_keymap\n");
|
||||
return;
|
||||
}
|
||||
|
||||
struct weston_seat *seat;
|
||||
wl_list_for_each(seat, &compositor->seat_list, link) {
|
||||
weston_seat_update_keymap(seat, keymap);
|
||||
}
|
||||
}
|
||||
|
||||
static const struct wakefield_interface wakefield_implementation = {
|
||||
.get_surface_location = wakefield_get_surface_location,
|
||||
.move_surface = wakefield_move_surface,
|
||||
@@ -626,11 +603,11 @@ static const struct wakefield_interface wakefield_implementation = {
|
||||
.send_cursor = wakefield_send_cursor,
|
||||
.send_button = wakefield_send_button,
|
||||
.send_wheel = wakefield_send_wheel,
|
||||
.set_xkb_rule_names = wakefield_set_xkb_rule_names,
|
||||
};
|
||||
|
||||
static void
|
||||
wakefield_bind(struct wl_client *client, void *data, uint32_t version, uint32_t id) {
|
||||
wakefield_bind(struct wl_client *client, void *data, uint32_t version, uint32_t id)
|
||||
{
|
||||
struct wakefield *wakefield = data;
|
||||
|
||||
struct wl_resource *resource = wl_resource_create(client, &wakefield_interface, 1, id);
|
||||
@@ -642,7 +619,8 @@ wakefield_bind(struct wl_client *client, void *data, uint32_t version, uint32_t
|
||||
}
|
||||
|
||||
static void
|
||||
wakefield_destroy(struct wl_listener *listener, void *data) {
|
||||
wakefield_destroy(struct wl_listener *listener, void *data)
|
||||
{
|
||||
struct wakefield *wakefield = container_of(listener, struct wakefield, destroy_listener);
|
||||
|
||||
weston_log_scope_printf(wakefield->log, "WAKEFIELD: destroy\n");
|
||||
@@ -654,7 +632,8 @@ wakefield_destroy(struct wl_listener *listener, void *data) {
|
||||
}
|
||||
|
||||
WL_EXPORT int
|
||||
wet_module_init(struct weston_compositor *wc, int *argc, char *argv[]) {
|
||||
wet_module_init(struct weston_compositor *wc, int *argc, char *argv[])
|
||||
{
|
||||
struct wakefield *wakefield = zalloc(sizeof(struct wakefield));
|
||||
if (wakefield == NULL)
|
||||
return -1;
|
||||
|
||||
@@ -148,11 +148,4 @@ public class PlatformGraphicsInfo {
|
||||
but this program performed an operation which requires it,
|
||||
""";
|
||||
}
|
||||
|
||||
public static String getSplashScreenLib() {
|
||||
if (PlatformGraphicsInfo.getToolkitID() == PlatformGraphicsInfo.TK_WAYLAND) {
|
||||
return "wlsplashscreen";
|
||||
}
|
||||
return "splashscreen";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -631,27 +631,6 @@ abstract class XDecoratedPeer extends XWindowPeer {
|
||||
updateSizeHints(dimensions);
|
||||
Rectangle client = dimensions.getClientRect();
|
||||
checkShellRect(client);
|
||||
|
||||
if (isTargetUndecorated() && this instanceof XFramePeer framePeer) {
|
||||
if (isMaximized()) {
|
||||
// Under Xorg, if an undecorated (read: client-side decorated)
|
||||
// window has been maximized (either vertically or horizontally),
|
||||
// it cannot change its size programmatically until both maximized
|
||||
// states have been cleared. And since the window is undecorated, it also
|
||||
// cannot change its size with the user's help because
|
||||
// "undecorated" means "no borders" and that, perhaps incorrectly, implies
|
||||
// that there's nothing to grab on in order to resize interactively.
|
||||
// To exit this viscous circle, drop the maximized state. This does have
|
||||
// unpleasant side effects (such as an animation played by the WM), but
|
||||
// those seem to be a lesser evil than the total inability to resize.
|
||||
int state = framePeer.getState();
|
||||
if ((state & Frame.MAXIMIZED_BOTH) != Frame.MAXIMIZED_BOTH) {
|
||||
state &= ~Frame.MAXIMIZED_BOTH;
|
||||
framePeer.setExtendedState(state);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setShellBounds(client);
|
||||
if (content != null &&
|
||||
!content.getSize().equals(newDimensions.getSize()))
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2023, JetBrains s.r.o.. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -26,29 +25,18 @@
|
||||
|
||||
package sun.awt.X11;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.awt.im.InputMethodRequests;
|
||||
import java.awt.AWTException;
|
||||
import java.awt.Component;
|
||||
import java.awt.Container;
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.im.spi.InputMethodContext;
|
||||
import java.awt.peer.ComponentPeer;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
import java.util.Objects;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import sun.awt.AWTAccessor;
|
||||
import sun.awt.X11GraphicsDevice;
|
||||
import sun.awt.X11InputMethod;
|
||||
|
||||
import sun.util.logging.PlatformLogger;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.CaretEvent;
|
||||
import javax.swing.event.CaretListener;
|
||||
import javax.swing.text.JTextComponent;
|
||||
|
||||
/**
|
||||
* Input Method Adapter for XIM (without Motif)
|
||||
*
|
||||
@@ -59,7 +47,6 @@ public class XInputMethod extends X11InputMethod {
|
||||
|
||||
public XInputMethod() throws AWTException {
|
||||
super();
|
||||
clientComponentCaretPositionTracker = new ClientComponentCaretPositionTracker(this);
|
||||
}
|
||||
|
||||
public void setInputMethodContext(InputMethodContext context) {
|
||||
@@ -71,82 +58,8 @@ public class XInputMethod extends X11InputMethod {
|
||||
if (peer != null) {
|
||||
adjustStatusWindow(peer.getContentWindow());
|
||||
}
|
||||
|
||||
if (doesSupportMovingCandidatesNativeWindow) {
|
||||
clientComponentCaretPositionTracker.onNotifyClientWindowChange(location);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void activate() {
|
||||
super.activate();
|
||||
|
||||
if (doesSupportMovingCandidatesNativeWindow) {
|
||||
updateCandidatesNativeWindowPosition(true);
|
||||
clientComponentCaretPositionTracker.startTracking(getClientComponent());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void deactivate(boolean isTemporary) {
|
||||
clientComponentCaretPositionTracker.stopTrackingCurrentComponent();
|
||||
super.deactivate(isTemporary);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispatchEvent(AWTEvent e) {
|
||||
if (doesSupportMovingCandidatesNativeWindow) {
|
||||
clientComponentCaretPositionTracker.onDispatchEvent(e);
|
||||
}
|
||||
super.dispatchEvent(e);
|
||||
}
|
||||
|
||||
|
||||
// Is called from native
|
||||
private static boolean isJbNewXimClientEnabled() {
|
||||
try {
|
||||
final String strVal = System.getProperty("jb.awt.newXimClient.enabled");
|
||||
final boolean defVal = true;
|
||||
|
||||
return (strVal == null) ? defVal : Boolean.parseBoolean(strVal);
|
||||
} catch (Exception err) {
|
||||
if (log.isLoggable(PlatformLogger.Level.SEVERE)) {
|
||||
log.severe("Error at isJbNewXimClientEnabled", err);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
protected boolean preferXBelowTheSpot() {
|
||||
try {
|
||||
if (BrokenImDetectionContext.EATEN_EVENTS_THRESHOLD > 0) {
|
||||
// The fix of JBR-1573,
|
||||
// which is incompatible with the implementation of the native below-the-spot mode (a.k.a. X over-the-spot),
|
||||
// is explicitly enabled.
|
||||
// So let's disable this mode in favor of that fix.
|
||||
|
||||
if (log.isLoggable(PlatformLogger.Level.WARNING)) {
|
||||
log.warning("The property \"jb.awt.newXimClient.preferBelowTheSpot\" is ignored in favor of the explicitly enabled \"recreate.x11.input.method\"");
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
final String strVal = System.getProperty("jb.awt.newXimClient.preferBelowTheSpot");
|
||||
final boolean defVal = true;
|
||||
|
||||
return (strVal == null) ? defVal : Boolean.parseBoolean(strVal);
|
||||
} catch (Exception err) {
|
||||
if (log.isLoggable(PlatformLogger.Level.SEVERE)) {
|
||||
log.severe("Error at isJbNewXimClientEnabled", err);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
protected boolean openXIM() {
|
||||
return openXIMNative(XToolkit.getDisplay());
|
||||
}
|
||||
@@ -156,14 +69,14 @@ public class XInputMethod extends X11InputMethod {
|
||||
if (peer == null) {
|
||||
return false;
|
||||
}
|
||||
return createXICNative(peer.getContentWindow(), preferXBelowTheSpot());
|
||||
return createXICNative(peer.getContentWindow());
|
||||
}
|
||||
|
||||
protected boolean recreateXIC(int ctxid) {
|
||||
final XComponentPeer peer = (XComponentPeer)getPeer(clientComponentWindow);
|
||||
if (peer == null || pData == 0)
|
||||
return true;
|
||||
return recreateXICNative(peer.getContentWindow(), pData, ctxid, preferXBelowTheSpot());
|
||||
return recreateXICNative(peer.getContentWindow(), pData, ctxid);
|
||||
}
|
||||
protected int releaseXIC() {
|
||||
if (pData == 0)
|
||||
@@ -173,7 +86,8 @@ public class XInputMethod extends X11InputMethod {
|
||||
|
||||
private static volatile long xicFocus;
|
||||
|
||||
protected void setXICFocus(ComponentPeer peer, boolean value, boolean active) {
|
||||
protected void setXICFocus(ComponentPeer peer,
|
||||
boolean value, boolean active) {
|
||||
if (peer == null) {
|
||||
return;
|
||||
}
|
||||
@@ -181,17 +95,15 @@ public class XInputMethod extends X11InputMethod {
|
||||
setXICFocusNative(((XComponentPeer)peer).getContentWindow(),
|
||||
value,
|
||||
active);
|
||||
|
||||
doesSupportMovingCandidatesNativeWindow = value && doesFocusedXICSupportMovingCandidatesNativeWindow();
|
||||
}
|
||||
|
||||
public static long getXICFocus() {
|
||||
return xicFocus;
|
||||
}
|
||||
|
||||
/* XAWT_HACK FIX ME!
|
||||
do NOT call client code!
|
||||
*/
|
||||
/* XAWT_HACK FIX ME!
|
||||
do NOT call client code!
|
||||
*/
|
||||
protected Container getParent(Component client) {
|
||||
return client.getParent();
|
||||
}
|
||||
@@ -310,12 +222,12 @@ public class XInputMethod extends X11InputMethod {
|
||||
|
||||
|
||||
static {
|
||||
int eatenEventsThresholdInitializer = 0;
|
||||
final String eventsThresholdMode = System.getProperty("recreate.x11.input.method", "false");
|
||||
int eatenEventsThresholdInitializer = 7;
|
||||
final String eventsThresholdMode = System.getProperty("recreate.x11.input.method", "true");
|
||||
|
||||
if ("true".equalsIgnoreCase(eventsThresholdMode)) {
|
||||
eatenEventsThresholdInitializer = 7;
|
||||
} else if (!"false".equalsIgnoreCase(eventsThresholdMode)) {
|
||||
if ("false".equals(eventsThresholdMode)) {
|
||||
eatenEventsThresholdInitializer = 0;
|
||||
} else if (!"true".equals(eventsThresholdMode)) {
|
||||
try {
|
||||
eatenEventsThresholdInitializer = Integer.parseInt(eventsThresholdMode);
|
||||
} catch (NumberFormatException err) {
|
||||
@@ -333,397 +245,14 @@ public class XInputMethod extends X11InputMethod {
|
||||
}
|
||||
|
||||
|
||||
// JBR-2460
|
||||
private volatile boolean doesSupportMovingCandidatesNativeWindow = false;
|
||||
private Point lastKnownCandidatesNativeWindowAbsolutePosition = null;
|
||||
|
||||
private void updateCandidatesNativeWindowPosition(final boolean forceUpdate) {
|
||||
assert(SwingUtilities.isEventDispatchThread());
|
||||
|
||||
if (!doesSupportMovingCandidatesNativeWindow) {
|
||||
return;
|
||||
}
|
||||
|
||||
final Component clientComponent = getClientComponent();
|
||||
if (clientComponent == null) {
|
||||
// No client
|
||||
return;
|
||||
}
|
||||
|
||||
final Window clientComponentWindow = getClientComponentWindow();
|
||||
if (clientComponentWindow == null) {
|
||||
// Impossible?
|
||||
return;
|
||||
}
|
||||
|
||||
if (!clientComponent.isShowing() || (!clientComponentWindow.isShowing())) {
|
||||
// Components are not showing yet, so it's impossible to determine their location on the screen
|
||||
// and/or the location of the caret
|
||||
return;
|
||||
}
|
||||
|
||||
final Point clientComponentAbsolutePos = clientComponent.getLocationOnScreen();
|
||||
final int clientComponentAbsoluteMaxX = clientComponentAbsolutePos.x + clientComponent.getWidth();
|
||||
final int clientComponentAbsoluteMaxY = clientComponentAbsolutePos.y + clientComponent.getHeight();
|
||||
|
||||
// Initial values are the fallback which is the bottom-left corner of the component
|
||||
final Point expectedCandidatesNativeWindowAbsolutePos = new Point(
|
||||
clientComponentAbsolutePos.x,
|
||||
clientComponentAbsoluteMaxY
|
||||
);
|
||||
|
||||
final InputMethodRequests clientImr = clientComponent.getInputMethodRequests();
|
||||
if (clientImr != null) {
|
||||
// An active client
|
||||
|
||||
final Rectangle caretRect = clientImr.getTextLocation(null);
|
||||
if (caretRect != null) {
|
||||
expectedCandidatesNativeWindowAbsolutePos.x = caretRect.x;
|
||||
expectedCandidatesNativeWindowAbsolutePos.y = caretRect.y + caretRect.height;
|
||||
}
|
||||
}
|
||||
|
||||
// Clamping within the client component's visible rect (if available and not empty) or just its bounds
|
||||
final var clientComponentVisibleRect = getJComponentVisibleRectIfNotEmpty(clientComponent);
|
||||
if (clientComponentVisibleRect == null) {
|
||||
expectedCandidatesNativeWindowAbsolutePos.x =
|
||||
Math.max(clientComponentAbsolutePos.x, Math.min(expectedCandidatesNativeWindowAbsolutePos.x, clientComponentAbsoluteMaxX - 1));
|
||||
expectedCandidatesNativeWindowAbsolutePos.y =
|
||||
Math.max(clientComponentAbsolutePos.y, Math.min(expectedCandidatesNativeWindowAbsolutePos.y, clientComponentAbsoluteMaxY - 1));
|
||||
} else {
|
||||
final int visibleBoundsAbsoluteMinX = clientComponentAbsolutePos.x + clientComponentVisibleRect.x;
|
||||
final int visibleBoundsAbsoluteMaxX = visibleBoundsAbsoluteMinX + clientComponentVisibleRect.width;
|
||||
final int visibleBoundsAbsoluteMinY = clientComponentAbsolutePos.y + clientComponentVisibleRect.y;
|
||||
final int visibleBoundsAbsoluteMaxY = visibleBoundsAbsoluteMinY + clientComponentVisibleRect.height;
|
||||
|
||||
expectedCandidatesNativeWindowAbsolutePos.x =
|
||||
Math.max(visibleBoundsAbsoluteMinX, Math.min(expectedCandidatesNativeWindowAbsolutePos.x, visibleBoundsAbsoluteMaxX - 1));
|
||||
expectedCandidatesNativeWindowAbsolutePos.y =
|
||||
Math.max(visibleBoundsAbsoluteMinY, Math.min(expectedCandidatesNativeWindowAbsolutePos.y, visibleBoundsAbsoluteMaxY - 1));
|
||||
}
|
||||
|
||||
// Scaling the coordinates according to the screen's current scaling settings.
|
||||
// To do it properly, we have to know the screen which the point is on.
|
||||
// The code below supposes this is the one which clientComponent belongs to, because we've clamped
|
||||
// the point coordinates within the component's bounds above.
|
||||
final X11GraphicsDevice candidatesNativeWindowDevice = getComponentX11Device(clientComponent);
|
||||
if (candidatesNativeWindowDevice != null) {
|
||||
expectedCandidatesNativeWindowAbsolutePos.x =
|
||||
candidatesNativeWindowDevice.scaleUpX(expectedCandidatesNativeWindowAbsolutePos.x);
|
||||
expectedCandidatesNativeWindowAbsolutePos.y =
|
||||
candidatesNativeWindowDevice.scaleUpY(expectedCandidatesNativeWindowAbsolutePos.y);
|
||||
}
|
||||
|
||||
// Clamping within screen bounds (to avoid the input candidates window to appear outside a screen).
|
||||
final Rectangle closestScreenScaledBounds = new Rectangle();
|
||||
final X11GraphicsDevice candidatesNativeWindowClosestScreen = findClosestScreenToPoint(
|
||||
closestScreenScaledBounds,
|
||||
expectedCandidatesNativeWindowAbsolutePos,
|
||||
candidatesNativeWindowDevice
|
||||
);
|
||||
if (candidatesNativeWindowClosestScreen != null) {
|
||||
final int screenScaledBoundsXMax = closestScreenScaledBounds.x + closestScreenScaledBounds.width - 1;
|
||||
final int screenScaledBoundsYMax = closestScreenScaledBounds.y + closestScreenScaledBounds.height - 1;
|
||||
|
||||
expectedCandidatesNativeWindowAbsolutePos.x =
|
||||
Math.max(closestScreenScaledBounds.x, Math.min(expectedCandidatesNativeWindowAbsolutePos.x, screenScaledBoundsXMax));
|
||||
expectedCandidatesNativeWindowAbsolutePos.y =
|
||||
Math.max(closestScreenScaledBounds.y, Math.min(expectedCandidatesNativeWindowAbsolutePos.y, screenScaledBoundsYMax));
|
||||
}
|
||||
|
||||
if (forceUpdate || !expectedCandidatesNativeWindowAbsolutePos.equals(lastKnownCandidatesNativeWindowAbsolutePosition)) {
|
||||
// adjustCandidatesNativeWindowPosition expects coordinates relative to the client window
|
||||
final Point clientComponentWindowAbsolutePos = clientComponentWindow.getLocationOnScreen();
|
||||
final X11GraphicsDevice clientComponentWindowDevice = getComponentX11Device(clientComponentWindow);
|
||||
if (clientComponentWindowDevice != null) {
|
||||
clientComponentWindowAbsolutePos.x =
|
||||
clientComponentWindowDevice.scaleUpX(clientComponentWindowAbsolutePos.x);
|
||||
clientComponentWindowAbsolutePos.y =
|
||||
clientComponentWindowDevice.scaleUpY(clientComponentWindowAbsolutePos.y);
|
||||
}
|
||||
|
||||
final int relativeX = expectedCandidatesNativeWindowAbsolutePos.x - clientComponentWindowAbsolutePos.x;
|
||||
final int relativeY = expectedCandidatesNativeWindowAbsolutePos.y - clientComponentWindowAbsolutePos.y;
|
||||
|
||||
awtLock();
|
||||
try {
|
||||
adjustCandidatesNativeWindowPosition(relativeX, relativeY);
|
||||
} finally {
|
||||
awtUnlock();
|
||||
}
|
||||
|
||||
lastKnownCandidatesNativeWindowAbsolutePosition = expectedCandidatesNativeWindowAbsolutePos;
|
||||
}
|
||||
}
|
||||
|
||||
private static Rectangle getJComponentVisibleRectIfNotEmpty(final Component component) {
|
||||
if (component instanceof JComponent jComponent) {
|
||||
final Rectangle result = jComponent.getVisibleRect();
|
||||
if ((result != null) && (result.width > 0) && (result.height > 0)) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static X11GraphicsDevice getComponentX11Device(final Component component) {
|
||||
if (component == null) return null;
|
||||
|
||||
final var componentGc = component.getGraphicsConfiguration();
|
||||
if (componentGc == null) return null;
|
||||
|
||||
return (componentGc.getDevice() instanceof X11GraphicsDevice result) ? result : null;
|
||||
}
|
||||
|
||||
private static X11GraphicsDevice findClosestScreenToPoint(
|
||||
final Rectangle outScreenScaledBounds,
|
||||
final Point absolutePointScaled,
|
||||
final X11GraphicsDevice... screensToCheckFirst
|
||||
) {
|
||||
assert(outScreenScaledBounds != null);
|
||||
|
||||
if (absolutePointScaled == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
final Iterator<X11GraphicsDevice> screensToCheck =
|
||||
Stream.concat( // screensToCheckFirst + GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices()
|
||||
Arrays.stream(screensToCheckFirst),
|
||||
Stream.<Supplier<GraphicsDevice[]>>of(() -> {
|
||||
final var localGe = GraphicsEnvironment.getLocalGraphicsEnvironment();
|
||||
if (localGe != null) {
|
||||
return localGe.getScreenDevices();
|
||||
}
|
||||
return null;
|
||||
}).flatMap(supplier -> Stream.of(supplier.get()))
|
||||
).map(device -> (device instanceof X11GraphicsDevice screen) ? screen : null)
|
||||
.filter(Objects::nonNull)
|
||||
.iterator();
|
||||
|
||||
int closestScreenMinDistance = Integer.MAX_VALUE;
|
||||
X11GraphicsDevice result = null;
|
||||
while (screensToCheck.hasNext()) {
|
||||
final X11GraphicsDevice screen = screensToCheck.next();
|
||||
|
||||
final Rectangle screenBoundsScaled = screen.getBounds();
|
||||
if (screenBoundsScaled == null) {
|
||||
continue;
|
||||
}
|
||||
screenBoundsScaled.width = screen.scaleUp(screenBoundsScaled.width);
|
||||
screenBoundsScaled.height = screen.scaleUp(screenBoundsScaled.height);
|
||||
|
||||
final int distance = obtainDistanceBetween(screenBoundsScaled, absolutePointScaled);
|
||||
if (distance < closestScreenMinDistance) {
|
||||
result = screen;
|
||||
closestScreenMinDistance = distance;
|
||||
|
||||
outScreenScaledBounds.x = screenBoundsScaled.x;
|
||||
outScreenScaledBounds.y = screenBoundsScaled.y;
|
||||
outScreenScaledBounds.width = screenBoundsScaled.width;
|
||||
outScreenScaledBounds.height = screenBoundsScaled.height;
|
||||
|
||||
if (distance < 1) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private static int obtainDistanceBetween(final Rectangle rectangle, final Point absolutePointScaled) {
|
||||
if ((rectangle.width < 1) || (rectangle.height < 1)) {
|
||||
return Integer.MAX_VALUE;
|
||||
}
|
||||
|
||||
final int screenBoundsScaledXMax = rectangle.x + rectangle.width - 1;
|
||||
final int screenBoundsScaledYMax = rectangle.y + rectangle.height - 1;
|
||||
|
||||
final int dx = Math.max(0, Math.max(rectangle.x - absolutePointScaled.x, absolutePointScaled.x - screenBoundsScaledXMax));
|
||||
final int dy = Math.max(0, Math.max(rectangle.y - absolutePointScaled.y, absolutePointScaled.y - screenBoundsScaledYMax));
|
||||
|
||||
return dx + dy; // just sum is enough for our purposes
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Native methods
|
||||
*/
|
||||
private native boolean openXIMNative(long display);
|
||||
private native boolean createXICNative(long window, boolean preferBelowTheSpot);
|
||||
private native boolean recreateXICNative(long window, long px11data, int ctxid, boolean preferBelowTheSpot);
|
||||
private native boolean createXICNative(long window);
|
||||
private native boolean recreateXICNative(long window, long px11data, int ctxid);
|
||||
private native int releaseXICNative(long px11data);
|
||||
private native void setXICFocusNative(long window, boolean value, boolean active);
|
||||
private native void setXICFocusNative(long window,
|
||||
boolean value, boolean active);
|
||||
private native void adjustStatusWindow(long window);
|
||||
|
||||
private native boolean doesFocusedXICSupportMovingCandidatesNativeWindow();
|
||||
|
||||
private native void adjustCandidatesNativeWindowPosition(int x, int y);
|
||||
|
||||
|
||||
/**
|
||||
* This class tries to track all the cases when the position of the parent XInputMethod's candidate window has
|
||||
* to be updated. Here are the examples of such cases:
|
||||
* <ul>
|
||||
* <li>The caret position has changed ;
|
||||
* <li>The component has been moved/resized ;
|
||||
* <li>The component's window has been moved/resized ;
|
||||
* <li>The component's text has been changed ;
|
||||
* </ul>
|
||||
* Tracking makes sense only when the parent XIM is in a mode allowing to move a native candidates window.
|
||||
* This is controlled by a flag {@link XInputMethod#doesSupportMovingCandidatesNativeWindow}.
|
||||
* Thus, the tracking gets enabled (via {@link #startTracking(Component)}) only when the flag is evaluated to true.
|
||||
*/
|
||||
private static class ClientComponentCaretPositionTracker implements ComponentListener, CaretListener, TextListener
|
||||
{
|
||||
public ClientComponentCaretPositionTracker(XInputMethod owner) {
|
||||
this.owner = new WeakReference<>(owner);
|
||||
}
|
||||
|
||||
|
||||
public void startTracking(final Component component) {
|
||||
stopTrackingCurrentComponent();
|
||||
|
||||
if (component == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
trackedComponent = new WeakReference<>(component);
|
||||
|
||||
// Moving and changing the size causes a possible change of caret position
|
||||
component.addComponentListener(this);
|
||||
|
||||
if (component instanceof JTextComponent jtc) {
|
||||
jtc.addCaretListener(this);
|
||||
isCaretListenerInstalled = true;
|
||||
} else if (component instanceof TextComponent tc) {
|
||||
tc.addTextListener(this);
|
||||
isTextListenerInstalled = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void stopTrackingCurrentComponent() {
|
||||
final Component trackedComponentStrong;
|
||||
if (trackedComponent == null) {
|
||||
trackedComponentStrong = null;
|
||||
} else {
|
||||
trackedComponentStrong = trackedComponent.get();
|
||||
trackedComponent.clear();
|
||||
trackedComponent = null;
|
||||
}
|
||||
|
||||
if (trackedComponentStrong == null) {
|
||||
isCaretListenerInstalled = false;
|
||||
isTextListenerInstalled = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (isTextListenerInstalled) {
|
||||
isTextListenerInstalled = false;
|
||||
((TextComponent)trackedComponentStrong).removeTextListener(this);
|
||||
}
|
||||
|
||||
if (isCaretListenerInstalled) {
|
||||
isCaretListenerInstalled = false;
|
||||
((JTextComponent)trackedComponentStrong).removeCaretListener(this);
|
||||
}
|
||||
|
||||
trackedComponentStrong.removeComponentListener(this);
|
||||
}
|
||||
|
||||
/* Listening callbacks */
|
||||
|
||||
public void onDispatchEvent(AWTEvent event) {
|
||||
if (isCaretListenerInstalled) {
|
||||
return;
|
||||
}
|
||||
|
||||
final int eventId = event.getID();
|
||||
|
||||
if ( (eventId >= MouseEvent.MOUSE_FIRST) && (eventId <= MouseEvent.MOUSE_LAST) ) {
|
||||
// The event hasn't been dispatched yet, so the caret position couldn't be changed.
|
||||
// Hence, we have to postpone the updating request.
|
||||
SwingUtilities.invokeLater(() -> updateImCandidatesNativeWindowPosition(false));
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !isTextListenerInstalled && (eventId >= KeyEvent.KEY_FIRST) && (eventId <= KeyEvent.KEY_LAST) ) {
|
||||
// The event hasn't been dispatched yet, so the caret position couldn't be changed.
|
||||
// Hence, we have to postpone the updating request.
|
||||
SwingUtilities.invokeLater(() -> updateImCandidatesNativeWindowPosition(false));
|
||||
}
|
||||
}
|
||||
|
||||
public void onNotifyClientWindowChange(Rectangle location) {
|
||||
if (location != null) {
|
||||
updateImCandidatesNativeWindowPosition(lastKnownClientWindowBounds == null);
|
||||
}
|
||||
lastKnownClientWindowBounds = location;
|
||||
}
|
||||
|
||||
// ComponentListener
|
||||
|
||||
@Override
|
||||
public void componentHidden(ComponentEvent e) {}
|
||||
|
||||
@Override
|
||||
public void componentMoved(ComponentEvent e) {
|
||||
updateImCandidatesNativeWindowPosition(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void componentResized(ComponentEvent e) {
|
||||
updateImCandidatesNativeWindowPosition(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void componentShown(ComponentEvent e) {
|
||||
updateImCandidatesNativeWindowPosition(false);
|
||||
}
|
||||
|
||||
// CaretListener
|
||||
|
||||
@Override
|
||||
public void caretUpdate(CaretEvent e) {
|
||||
updateImCandidatesNativeWindowPosition(false);
|
||||
}
|
||||
|
||||
// TextListener
|
||||
|
||||
@Override
|
||||
public void textValueChanged(TextEvent e) {
|
||||
updateImCandidatesNativeWindowPosition(false);
|
||||
}
|
||||
|
||||
/* Private parts */
|
||||
|
||||
private final WeakReference<XInputMethod> owner;
|
||||
private WeakReference<Component> trackedComponent = null;
|
||||
private boolean isCaretListenerInstalled = false;
|
||||
private boolean isTextListenerInstalled = false;
|
||||
private Rectangle lastKnownClientWindowBounds = null;
|
||||
|
||||
|
||||
private void updateImCandidatesNativeWindowPosition(boolean forceUpdate) {
|
||||
final XInputMethod ownerStrong = owner.get();
|
||||
|
||||
if ((ownerStrong == null) || (ownerStrong.isDisposed())) {
|
||||
// The owning XInputMethod instance is no longer valid
|
||||
|
||||
stopTrackingCurrentComponent();
|
||||
owner.clear();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (!ownerStrong.isActive) {
|
||||
stopTrackingCurrentComponent(); // will start tracking back when the owner gets active back
|
||||
return;
|
||||
}
|
||||
|
||||
ownerStrong.updateCandidatesNativeWindowPosition(forceUpdate);
|
||||
}
|
||||
}
|
||||
|
||||
final ClientComponentCaretPositionTracker clientComponentCaretPositionTracker;
|
||||
}
|
||||
|
||||
@@ -84,11 +84,15 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt
|
||||
}
|
||||
|
||||
private void requestState(XWindowPeer window, int state) {
|
||||
/*
|
||||
* We have to use toggle for maximization because of transitions
|
||||
* from maximization in one direction only to maximization in the
|
||||
* other direction only.
|
||||
*/
|
||||
int old_net_state = getState(window);
|
||||
int max_changed = (state ^ old_net_state) & (Frame.MAXIMIZED_BOTH);
|
||||
|
||||
XClientMessageEvent req = new XClientMessageEvent();
|
||||
int action = 0;
|
||||
try {
|
||||
switch(max_changed) {
|
||||
case 0:
|
||||
@@ -96,22 +100,14 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt
|
||||
case Frame.MAXIMIZED_HORIZ:
|
||||
req.set_data(1, XA_NET_WM_STATE_MAXIMIZED_HORZ.getAtom());
|
||||
req.set_data(2, 0);
|
||||
action = ((state & Frame.MAXIMIZED_HORIZ) == Frame.MAXIMIZED_HORIZ)
|
||||
? _NET_WM_STATE_ADD
|
||||
: _NET_WM_STATE_REMOVE;
|
||||
break;
|
||||
case Frame.MAXIMIZED_VERT:
|
||||
req.set_data(1, XA_NET_WM_STATE_MAXIMIZED_VERT.getAtom());
|
||||
req.set_data(2, 0);
|
||||
action = ((state & Frame.MAXIMIZED_VERT) == Frame.MAXIMIZED_VERT)
|
||||
? _NET_WM_STATE_ADD
|
||||
: _NET_WM_STATE_REMOVE;
|
||||
break;
|
||||
case Frame.MAXIMIZED_BOTH:
|
||||
// Somehow this doesn't work when changing HORZ->VERT, but works VERT->HORZ
|
||||
req.set_data(1, XA_NET_WM_STATE_MAXIMIZED_HORZ.getAtom());
|
||||
req.set_data(2, XA_NET_WM_STATE_MAXIMIZED_VERT.getAtom());
|
||||
action = _NET_WM_STATE_TOGGLE;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
@@ -123,7 +119,7 @@ final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProt
|
||||
req.set_window(window.getWindow());
|
||||
req.set_message_type(XA_NET_WM_STATE.getAtom());
|
||||
req.set_format(32);
|
||||
req.set_data(0, action);
|
||||
req.set_data(0, _NET_WM_STATE_TOGGLE);
|
||||
XToolkit.awtLock();
|
||||
try {
|
||||
XlibWrapper.XSendEvent(XToolkit.getDisplay(),
|
||||
|
||||
@@ -1845,7 +1845,6 @@ final class XWM
|
||||
Native.putLong(data, 2, 0);
|
||||
Native.putLong(data, 3, 0);
|
||||
|
||||
XToolkit.awtLock();
|
||||
XErrorHandlerUtil.WITH_XERROR_HANDLER(XErrorHandler.VerifyChangePropertyHandler.getInstance());
|
||||
XlibWrapper.XChangeProperty(XToolkit.getDisplay(), window,
|
||||
XA_GTK_FRAME_EXTENTS.getAtom(),
|
||||
@@ -1854,8 +1853,8 @@ final class XWM
|
||||
data, 4);
|
||||
XErrorHandlerUtil.RESTORE_XERROR_HANDLER();
|
||||
} finally {
|
||||
XToolkit.awtUnlock();
|
||||
unsafe.freeMemory(data);
|
||||
data = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -49,9 +49,7 @@ public class WLButtonPeer extends WLComponentPeer implements ButtonPeer {
|
||||
|
||||
@Override
|
||||
public void setLabel(String label) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLButtonPeer.setLabel(String)");
|
||||
}
|
||||
log.info("Not implemented: WLButtonPeer.setLabel(String)");
|
||||
}
|
||||
|
||||
public void setBackground(Color c) {
|
||||
@@ -60,30 +58,22 @@ public class WLButtonPeer extends WLComponentPeer implements ButtonPeer {
|
||||
|
||||
public void focusGained(FocusEvent e) {
|
||||
super.focusGained(e);
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLButtonPeer.focusGained(FocusEvent)");
|
||||
}
|
||||
log.info("Not implemented: WLButtonPeer.focusGained(FocusEvent)");
|
||||
}
|
||||
|
||||
public void focusLost(FocusEvent e) {
|
||||
super.focusLost(e);
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLButtonPeer.focusLost(FocusEvent)");
|
||||
}
|
||||
log.info("Not implemented: WLButtonPeer.focusLost(FocusEvent)");
|
||||
}
|
||||
|
||||
@Override
|
||||
void paintPeer(Graphics g) {
|
||||
super.paintPeer(g);
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLButtonPeer.paintPeer(Graphics)");
|
||||
}
|
||||
log.info("Not implemented: WLButtonPeer.paintPeer(Graphics)");
|
||||
}
|
||||
|
||||
public Dimension getMinimumSize() {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLButtonPeer.getMinimumSize()");
|
||||
}
|
||||
log.info("Not implemented: WLButtonPeer.getMinimumSize()");
|
||||
return new Dimension(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ import sun.awt.datatransfer.DataTransferer;
|
||||
import sun.awt.datatransfer.SunClipboard;
|
||||
import sun.util.logging.PlatformLogger;
|
||||
|
||||
import javax.swing.SwingUtilities;
|
||||
import java.awt.datatransfer.DataFlavor;
|
||||
import java.awt.datatransfer.FlavorTable;
|
||||
import java.awt.datatransfer.Transferable;
|
||||
@@ -70,18 +71,16 @@ public final class WLClipboard extends SunClipboard {
|
||||
// to be received from Wayland. Could be empty, but never null.
|
||||
private List<Long> newClipboardFormats = new ArrayList<>(INITIAL_MIME_FORMATS_COUNT); // guarded by 'this'
|
||||
|
||||
private static Thread clipboardDispatcherThread;
|
||||
static {
|
||||
initIDs();
|
||||
dataOfferQueuePtr = createDataOfferQueue();
|
||||
flavorTable = DataTransferer.adaptFlavorMap(getDefaultFlavorTable());
|
||||
|
||||
Thread t = InnocuousThread.newThread(
|
||||
final Thread toolkitSystemThread = InnocuousThread.newThread(
|
||||
"AWT-Wayland-clipboard-dispatcher",
|
||||
WLClipboard::dispatchDataOfferQueue);
|
||||
t.setDaemon(true);
|
||||
t.start();
|
||||
clipboardDispatcherThread = t;
|
||||
toolkitSystemThread.setDaemon(true);
|
||||
toolkitSystemThread.start();
|
||||
}
|
||||
|
||||
private final static FlavorTable flavorTable;
|
||||
@@ -98,8 +97,8 @@ public final class WLClipboard extends SunClipboard {
|
||||
|
||||
private static void dispatchDataOfferQueue() {
|
||||
dispatchDataOfferQueueImpl(dataOfferQueuePtr); // does not return until error or server disconnect
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Clipboard: data offer dispatcher exited");
|
||||
if (log.isLoggable(PlatformLogger.Level.INFO)) {
|
||||
log.info("Clipboard: data offer dispatcher exited");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,8 +160,7 @@ public final class WLClipboard extends SunClipboard {
|
||||
offerData(eventSerial, mime, contents, dataOfferQueuePtr);
|
||||
|
||||
// Once we have offered the data, someone may come back and ask to provide them.
|
||||
// In that event, the transferContentsWithType() will be called from native on the
|
||||
// clipboard dispatch thread.
|
||||
// In that event, the transferContentsWithType() will be called from native on EDT.
|
||||
// A reference to contents is retained until we are notified of the new contents
|
||||
// by the Wayland server.
|
||||
}
|
||||
@@ -185,8 +183,7 @@ public final class WLClipboard extends SunClipboard {
|
||||
* @throws IOException in case writing to the given file descriptor failed
|
||||
*/
|
||||
private void transferContentsWithType(Transferable contents, String mime, int destFD) throws IOException {
|
||||
assert (Thread.currentThread() == clipboardDispatcherThread);
|
||||
|
||||
assert SwingUtilities.isEventDispatchThread();
|
||||
Objects.requireNonNull(contents);
|
||||
Objects.requireNonNull(mime);
|
||||
|
||||
@@ -211,6 +208,10 @@ public final class WLClipboard extends SunClipboard {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Clipboard: about to write " + (bytes != null ? bytes.length : 0) + " bytes to " + out);
|
||||
}
|
||||
// TODO: large data transfer will block EDT for a long time.
|
||||
// Implement an option to do the writing on a dedicated thread.
|
||||
// Alternatively, arrange for this event to arrive on a dedicated queue and
|
||||
// only work with this queue on a dedicated thread.
|
||||
out.write(bytes);
|
||||
}
|
||||
}
|
||||
@@ -328,16 +329,12 @@ public final class WLClipboard extends SunClipboard {
|
||||
@Override
|
||||
protected void registerClipboardViewerChecked() {
|
||||
// TODO: is there any need to do more here?
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Unimplemented");
|
||||
}
|
||||
log.info("Unimplemented");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void unregisterClipboardViewerChecked() {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Unimplemented");
|
||||
}
|
||||
log.info("Unimplemented");
|
||||
}
|
||||
|
||||
private void notifyOfNewFormats(long[] formats) {
|
||||
|
||||
@@ -262,11 +262,11 @@ public class WLComponentPeer implements ComponentPeer {
|
||||
final int offsetY = offsetFromParent.y;
|
||||
|
||||
if (popupLog.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
popupLog.fine("New popup: " + popup);
|
||||
popupLog.fine("\tparent:" + popupParent);
|
||||
popupLog.fine("\ttoplevel: " + toplevel);
|
||||
popupLog.fine("\toffset of anchor from toplevel: " + toplevelLocation);
|
||||
popupLog.fine("\toffset from anchor: " + offsetFromParent);
|
||||
popupLog.info("New popup: " + popup);
|
||||
popupLog.info("\tparent:" + popupParent);
|
||||
popupLog.info("\ttoplevel: " + toplevel);
|
||||
popupLog.info("\toffset of anchor from toplevel: " + toplevelLocation);
|
||||
popupLog.info("\toffset from anchor: " + offsetFromParent);
|
||||
}
|
||||
|
||||
nativeCreateWLPopup(nativePtr,
|
||||
@@ -335,9 +335,7 @@ public class WLComponentPeer implements ComponentPeer {
|
||||
* @see ComponentPeer
|
||||
*/
|
||||
public void setEnabled(final boolean value) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLComponentPeer.setEnabled(boolean)");
|
||||
}
|
||||
log.info("Not implemented: WLComponentPeer.setEnabled(boolean)");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -395,9 +393,7 @@ public class WLComponentPeer implements ComponentPeer {
|
||||
}
|
||||
|
||||
public void print(Graphics g) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLComponentPeer.print(Graphics)");
|
||||
}
|
||||
log.info("Not implemented: WLComponentPeer.print(Graphics)");
|
||||
}
|
||||
|
||||
private void setLocationTo(int newX, int newY) {
|
||||
@@ -467,11 +463,11 @@ public class WLComponentPeer implements ComponentPeer {
|
||||
final int parentX = toplevelLocation.x;
|
||||
final int parentY = toplevelLocation.y;
|
||||
if (popupLog.isLoggable(Level.FINE)) {
|
||||
popupLog.fine("Repositioning popup: " + popup);
|
||||
popupLog.fine("\tparent:" + popupParent);
|
||||
popupLog.fine("\ttoplevel: " + toplevel);
|
||||
popupLog.fine("\toffset of anchor from toplevel: " + toplevelLocation);
|
||||
popupLog.fine("\toffset from anchor: " + newX + ", " + newY);
|
||||
popupLog.info("Repositioning popup: " + popup);
|
||||
popupLog.info("\tparent:" + popupParent);
|
||||
popupLog.info("\ttoplevel: " + toplevel);
|
||||
popupLog.info("\toffset of anchor from toplevel: " + toplevelLocation);
|
||||
popupLog.info("\toffset from anchor: " + newX + ", " + newY);
|
||||
}
|
||||
nativeRepositionWLPopup(nativePtr, parentX, parentY, parentWidth, parentHeight,
|
||||
thisWidth, thisHeight,
|
||||
@@ -594,13 +590,9 @@ public class WLComponentPeer implements ComponentPeer {
|
||||
}
|
||||
} else if (e instanceof KeyEvent && !((InputEvent) e).isConsumed()) {
|
||||
// even if target is disabled.
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLComponentPeer.handleEvent(AWTEvent): handleF10JavaKeyEvent");
|
||||
}
|
||||
log.info("Not implemented: WLComponentPeer.handleEvent(AWTEvent): handleF10JavaKeyEvent");
|
||||
} else if (e instanceof InputMethodEvent) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLComponentPeer.handleEvent(AWTEvent): handleJavaInputMethodEvent");
|
||||
}
|
||||
log.info("Not implemented: WLComponentPeer.handleEvent(AWTEvent): handleJavaInputMethodEvent");
|
||||
}
|
||||
|
||||
int id = e.getID();
|
||||
@@ -723,10 +715,7 @@ public class WLComponentPeer implements ComponentPeer {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Set foreground to " + c);
|
||||
}
|
||||
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLComponentPeer.setForeground(Color)");
|
||||
}
|
||||
log.info("Not implemented: WLComponentPeer.setForeground(Color)");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -766,7 +755,7 @@ public class WLComponentPeer implements ComponentPeer {
|
||||
WLComponentPeer peer = inputState.getPeer();
|
||||
if (peer == null) return;
|
||||
Cursor cursor = peer.getCursor(inputState.getPointerX(), inputState.getPointerY());
|
||||
setCursor(cursor, getGraphicsDevice() != null ? getGraphicsDevice().getScale() : 1);
|
||||
setCursor(cursor);
|
||||
}
|
||||
|
||||
Cursor getCursor(int x, int y) {
|
||||
@@ -780,7 +769,7 @@ public class WLComponentPeer implements ComponentPeer {
|
||||
return AWTAccessor.getComponentAccessor().getCursor(target);
|
||||
}
|
||||
|
||||
private static void setCursor(Cursor c, int scale) {
|
||||
private static void setCursor(Cursor c) {
|
||||
Cursor cursor;
|
||||
if (c.getType() == Cursor.CUSTOM_CURSOR && !(c instanceof WLCustomCursor)) {
|
||||
cursor = Cursor.getDefaultCursor();
|
||||
@@ -788,33 +777,27 @@ public class WLComponentPeer implements ComponentPeer {
|
||||
cursor = c;
|
||||
}
|
||||
performLockedGlobal(() -> {
|
||||
long pData = AWTAccessor.getCursorAccessor().getPData(cursor, scale);
|
||||
long pData = AWTAccessor.getCursorAccessor().getPData(cursor);
|
||||
if (pData == 0) {
|
||||
// instead of destroying and creating new cursor after changing scale could be used caching
|
||||
long oldPData = AWTAccessor.getCursorAccessor().getPData(cursor);
|
||||
if (oldPData != 0) {
|
||||
nativeDestroyPredefinedCursor(oldPData);
|
||||
}
|
||||
|
||||
pData = createNativeCursor(cursor.getType(), scale);
|
||||
pData = createNativeCursor(cursor.getType());
|
||||
if (pData == 0) {
|
||||
pData = createNativeCursor(Cursor.DEFAULT_CURSOR, scale);
|
||||
pData = createNativeCursor(Cursor.DEFAULT_CURSOR);
|
||||
}
|
||||
if (pData == 0) {
|
||||
pData = -1; // mark as unavailable
|
||||
}
|
||||
AWTAccessor.getCursorAccessor().setPData(cursor, scale, pData);
|
||||
AWTAccessor.getCursorAccessor().setPData(cursor, pData);
|
||||
}
|
||||
nativeSetCursor(pData, scale);
|
||||
nativeSetCursor(pData);
|
||||
});
|
||||
}
|
||||
|
||||
private static long createNativeCursor(int type, int scale) {
|
||||
private static long createNativeCursor(int type) {
|
||||
if (type < Cursor.DEFAULT_CURSOR || type > Cursor.MOVE_CURSOR) {
|
||||
type = Cursor.DEFAULT_CURSOR;
|
||||
}
|
||||
for (String name : CURSOR_NAMES[type]) {
|
||||
long pData = nativeGetPredefinedCursor(name, scale);
|
||||
long pData = nativeGetPredefinedCursor(name);
|
||||
if (pData != 0) {
|
||||
return pData;
|
||||
}
|
||||
@@ -865,9 +848,7 @@ public class WLComponentPeer implements ComponentPeer {
|
||||
|
||||
@Override
|
||||
public void setZOrder(ComponentPeer above) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLComponentPeer.setZOrder(ComponentPeer)");
|
||||
}
|
||||
log.info("Not implemented: WLComponentPeer.setZOrder(ComponentPeer)");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -968,9 +949,8 @@ public class WLComponentPeer implements ComponentPeer {
|
||||
private native void nativeSetWindowGeometry(long ptr, int x, int y, int width, int height);
|
||||
private native void nativeSetMinimumSize(long ptr, int width, int height);
|
||||
private native void nativeSetMaximumSize(long ptr, int width, int height);
|
||||
private static native void nativeSetCursor(long pData, int scale);
|
||||
private static native long nativeGetPredefinedCursor(String name, int scale);
|
||||
private static native long nativeDestroyPredefinedCursor(long pData);
|
||||
private static native void nativeSetCursor(long pData);
|
||||
private static native long nativeGetPredefinedCursor(String name);
|
||||
private native void nativeShowWindowMenu(long ptr, int x, int y);
|
||||
private native void nativeActivate(long ptr);
|
||||
|
||||
@@ -1030,7 +1010,7 @@ public class WLComponentPeer implements ComponentPeer {
|
||||
= WLPointerEvent.PointerButtonCodes.recognizedOrNull(e.getButtonCode());
|
||||
if (buttonCode != null) {
|
||||
clickCount = newInputState.getClickCount();
|
||||
isPopupTrigger = buttonCode.isPopupTrigger() && e.getIsButtonPressed();
|
||||
isPopupTrigger = buttonCode.isPopupTrigger();
|
||||
buttonChanged = buttonCode.javaCode;
|
||||
|
||||
final MouseEvent mouseEvent = new MouseEvent(getTarget(),
|
||||
|
||||
@@ -178,9 +178,7 @@ public class WLDataTransferer extends DataTransferer {
|
||||
@Override
|
||||
protected String[] dragQueryFile(byte[] bytes) {
|
||||
// TODO
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Unimplemented");
|
||||
}
|
||||
log.info("Unimplemented");
|
||||
return new String[0];
|
||||
}
|
||||
|
||||
|
||||
@@ -55,12 +55,12 @@ public class WLFramePeer extends WLDecoratedPeer implements FramePeer {
|
||||
|
||||
// @Override
|
||||
// public void beginLayout() {
|
||||
// log.fine("Not implemented: WLFramePeer.beginLayout()");
|
||||
// log.info("Not implemented: WLFramePeer.beginLayout()");
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void endLayout() {
|
||||
// log.fine("Not implemented: WLFramePeer.endLayout()");
|
||||
// log.info("Not implemented: WLFramePeer.endLayout()");
|
||||
// }
|
||||
|
||||
@Override
|
||||
|
||||
@@ -219,15 +219,9 @@ public class WLGraphicsDevice extends GraphicsDevice {
|
||||
return;
|
||||
}
|
||||
|
||||
boolean fsSupported = isFullScreenSupported();
|
||||
if (fsSupported && old != null) {
|
||||
// enter windowed mode and restore original display mode
|
||||
exitFullScreenExclusive(old);
|
||||
}
|
||||
|
||||
super.setFullScreenWindow(w);
|
||||
|
||||
if (fsSupported) {
|
||||
if (isFullScreenSupported()) {
|
||||
if (w != null) {
|
||||
enterFullScreenExclusive(w);
|
||||
} else {
|
||||
|
||||
@@ -38,6 +38,7 @@ package sun.awt.wl;
|
||||
* @param pointerButtonPressedEvent null or the latest PointerButtonEvent such that getIsButtonPressed() == true
|
||||
* @param modifiers a bit set of modifiers reflecting currently pressed keys (@see WLInputState.getNewModifiers())
|
||||
* @param surfaceForKeyboardInput represents 'struct wl_surface*' that keyboards events should go to
|
||||
* @param lockingKeyState a bit set of locking modifiers currently active
|
||||
*/
|
||||
record WLInputState(WLPointerEvent eventWithSurface,
|
||||
WLPointerEvent eventWithSerial,
|
||||
@@ -46,7 +47,8 @@ record WLInputState(WLPointerEvent eventWithSurface,
|
||||
PointerButtonEvent pointerButtonPressedEvent,
|
||||
int modifiers,
|
||||
long surfaceForKeyboardInput,
|
||||
boolean isPointerOverSurface) {
|
||||
boolean isPointerOverSurface,
|
||||
int lockingKeyState) {
|
||||
/**
|
||||
* Groups together information about a mouse pointer button event.
|
||||
* @param surface 'struct wl_surface*' the button was pressed over
|
||||
@@ -60,7 +62,7 @@ record WLInputState(WLPointerEvent eventWithSurface,
|
||||
|
||||
static WLInputState initialState() {
|
||||
return new WLInputState(null, null, null, null,
|
||||
null, 0, 0, false);
|
||||
null, 0, 0, false, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -92,7 +94,8 @@ record WLInputState(WLPointerEvent eventWithSurface,
|
||||
newPointerButtonEvent,
|
||||
newModifiers,
|
||||
surfaceForKeyboardInput,
|
||||
newPointerOverSurface);
|
||||
newPointerOverSurface,
|
||||
lockingKeyState);
|
||||
}
|
||||
|
||||
public WLInputState updatedFromKeyboardEnterEvent(long serial, long surfacePtr) {
|
||||
@@ -105,10 +108,11 @@ record WLInputState(WLPointerEvent eventWithSurface,
|
||||
pointerButtonPressedEvent,
|
||||
modifiers,
|
||||
surfacePtr,
|
||||
isPointerOverSurface);
|
||||
isPointerOverSurface,
|
||||
lockingKeyState);
|
||||
}
|
||||
|
||||
public WLInputState updatedFromKeyboardModifiersEvent(long serial, int keyboardModifiers) {
|
||||
public WLInputState updatedFromKeyboardModifiersEvent(long serial, int keyboardModifiers, int newLockingKeyState) {
|
||||
// "The compositor must send the wl_keyboard.modifiers event after this event".
|
||||
final int oldPointerModifiers = modifiers & WLPointerEvent.PointerButtonCodes.combinedMask();
|
||||
final int newModifiers = oldPointerModifiers | keyboardModifiers;
|
||||
@@ -120,7 +124,8 @@ record WLInputState(WLPointerEvent eventWithSurface,
|
||||
pointerButtonPressedEvent,
|
||||
newModifiers,
|
||||
surfaceForKeyboardInput,
|
||||
isPointerOverSurface);
|
||||
isPointerOverSurface,
|
||||
newLockingKeyState);
|
||||
}
|
||||
|
||||
public WLInputState updatedFromKeyboardLeaveEvent(long serial, long surfacePtr) {
|
||||
@@ -135,7 +140,8 @@ record WLInputState(WLPointerEvent eventWithSurface,
|
||||
pointerButtonPressedEvent,
|
||||
newModifiers,
|
||||
0,
|
||||
isPointerOverSurface);
|
||||
isPointerOverSurface,
|
||||
lockingKeyState);
|
||||
}
|
||||
|
||||
public WLInputState resetPointerState() {
|
||||
@@ -147,7 +153,8 @@ record WLInputState(WLPointerEvent eventWithSurface,
|
||||
pointerButtonPressedEvent,
|
||||
0,
|
||||
surfaceForKeyboardInput,
|
||||
false);
|
||||
false,
|
||||
lockingKeyState);
|
||||
}
|
||||
|
||||
private PointerButtonEvent getNewPointerButtonEvent(WLPointerEvent pointerEvent,
|
||||
|
||||
1031
src/java.desktop/unix/classes/sun/awt/wl/WLKeySym.java
Normal file
1031
src/java.desktop/unix/classes/sun/awt/wl/WLKeySym.java
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,137 +0,0 @@
|
||||
/*
|
||||
* Copyright 2023 JetBrains s.r.o.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.awt.wl;
|
||||
|
||||
import java.awt.*;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.Timer;
|
||||
import java.awt.event.InputEvent;
|
||||
import java.util.TimerTask;
|
||||
|
||||
class WLKeyboard {
|
||||
WLKeyboard() {
|
||||
keyRepeatManager = new KeyRepeatManager();
|
||||
initialize(keyRepeatManager);
|
||||
}
|
||||
|
||||
private class KeyRepeatManager {
|
||||
private final Timer timer = new Timer("WLKeyboard.KeyRepeatManager", true);
|
||||
private TimerTask currentRepeatTask;
|
||||
private int delayBeforeRepeatMillis = 500;
|
||||
private int delayBetweenRepeatMillis = 50;
|
||||
|
||||
void setRepeatInfo(int charsPerSecond, int delayMillis) {
|
||||
this.delayBeforeRepeatMillis = delayMillis;
|
||||
this.delayBetweenRepeatMillis = (int) (1000.0 / charsPerSecond);
|
||||
}
|
||||
|
||||
void cancelRepeat() {
|
||||
if (currentRepeatTask != null) {
|
||||
currentRepeatTask.cancel();
|
||||
currentRepeatTask = null;
|
||||
}
|
||||
}
|
||||
|
||||
void startRepeat(long timestamp, int keycode) {
|
||||
cancelRepeat();
|
||||
if (keycode == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
long delta = timestamp - System.currentTimeMillis();
|
||||
currentRepeatTask = new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
EventQueue.invokeAndWait(() -> {
|
||||
handleKeyPress(delta + System.currentTimeMillis(), keycode, true);
|
||||
});
|
||||
} catch (InterruptedException ignored) {
|
||||
} catch (InvocationTargetException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
timer.scheduleAtFixedRate(currentRepeatTask, delayBeforeRepeatMillis, delayBetweenRepeatMillis);
|
||||
}
|
||||
}
|
||||
|
||||
public static final int XKB_SHIFT_MASK = 1 << 0;
|
||||
public static final int XKB_CAPS_LOCK_MASK = 1 << 1;
|
||||
public static final int XKB_CTRL_MASK = 1 << 2;
|
||||
public static final int XKB_ALT_MASK = 1 << 3;
|
||||
public static final int XKB_NUM_LOCK_MASK = 1 << 4;
|
||||
public static final int XKB_MOD3_MASK = 1 << 5;
|
||||
public static final int XKB_META_MASK = 1 << 6;
|
||||
public static final int XKB_MOD5_MASK = 1 << 7;
|
||||
|
||||
private final KeyRepeatManager keyRepeatManager;
|
||||
|
||||
private native void initialize(KeyRepeatManager keyRepeatManager);
|
||||
|
||||
public int getModifiers() {
|
||||
int result = 0;
|
||||
int mask = getXKBModifiersMask();
|
||||
|
||||
if ((mask & XKB_SHIFT_MASK) != 0) {
|
||||
result |= InputEvent.SHIFT_DOWN_MASK;
|
||||
}
|
||||
|
||||
if ((mask & XKB_CTRL_MASK) != 0) {
|
||||
result |= InputEvent.CTRL_DOWN_MASK;
|
||||
}
|
||||
|
||||
if ((mask & XKB_ALT_MASK) != 0) {
|
||||
result |= InputEvent.ALT_DOWN_MASK;
|
||||
}
|
||||
|
||||
if ((mask & XKB_META_MASK) != 0) {
|
||||
result |= InputEvent.META_DOWN_MASK;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public boolean isCapsLockPressed() {
|
||||
return (getXKBModifiersMask() & XKB_CAPS_LOCK_MASK) != 0;
|
||||
}
|
||||
|
||||
public boolean isNumLockPressed() {
|
||||
return (getXKBModifiersMask() & XKB_NUM_LOCK_MASK) != 0;
|
||||
}
|
||||
|
||||
public void onLostFocus() {
|
||||
keyRepeatManager.cancelRepeat();
|
||||
cancelCompose();
|
||||
}
|
||||
|
||||
private native void handleKeyPress(long timestamp, int keycode, boolean isRepeat);
|
||||
|
||||
private native void cancelCompose();
|
||||
|
||||
private native int getXKBModifiersMask();
|
||||
}
|
||||
@@ -167,6 +167,4 @@ public class WLRobotPeer implements RobotPeer {
|
||||
private static native void mouseMoveImpl(int x, int y);
|
||||
private static native void sendMouseButtonImpl(int buttons, boolean pressed);
|
||||
private static native void mouseWheelImpl(int amount);
|
||||
|
||||
public static native void setXKBLayout(String layout, String variant, String options);
|
||||
}
|
||||
|
||||
@@ -81,6 +81,7 @@ import java.awt.peer.TextFieldPeer;
|
||||
import java.awt.peer.TrayIconPeer;
|
||||
import java.awt.peer.WindowPeer;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
||||
import java.util.Arrays;
|
||||
@@ -88,6 +89,8 @@ import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
import java.util.concurrent.Semaphore;
|
||||
|
||||
/**
|
||||
@@ -133,6 +136,9 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
|
||||
private static final int MOUSE_BUTTONS_COUNT = 3;
|
||||
private static final int AWT_MULTICLICK_DEFAULT_TIME_MS = 500;
|
||||
|
||||
private static final int CAPS_LOCK_MASK = 0x01;
|
||||
private static final int NUM_LOCK_MASK = 0x02;
|
||||
|
||||
private static boolean initialized = false;
|
||||
private static Thread toolkitThread;
|
||||
private final WLClipboard clipboard;
|
||||
@@ -142,7 +148,6 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
|
||||
|
||||
static {
|
||||
if (!GraphicsEnvironment.isHeadless()) {
|
||||
keyboard = new WLKeyboard();
|
||||
initIDs();
|
||||
}
|
||||
initialized = true;
|
||||
@@ -269,8 +274,114 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
|
||||
return AWT_MULTICLICK_DEFAULT_TIME_MS;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The rate of repeating keys in characters per second
|
||||
* Set from the native code by the 'repeat_info' Wayland event (see wayland.xml).
|
||||
*/
|
||||
static volatile int keyRepeatRate = 33;
|
||||
|
||||
/**
|
||||
* Delay in milliseconds since key down until repeating starts.
|
||||
* Set from the native code by the 'repeat_info' Wayland event (see wayland.xml).
|
||||
*/
|
||||
static volatile int keyRepeatDelay = 500;
|
||||
|
||||
static int getKeyRepeatRate() {
|
||||
return keyRepeatRate;
|
||||
}
|
||||
|
||||
static int getKeyRepeatDelay() {
|
||||
return keyRepeatDelay;
|
||||
}
|
||||
|
||||
private static class KeyRepeatManager {
|
||||
private Timer keyRepeatTimer;
|
||||
private PostKeyEventTask postKeyEventTask;
|
||||
|
||||
KeyRepeatManager() {
|
||||
}
|
||||
|
||||
private void stopKeyRepeat() {
|
||||
assert EventQueue.isDispatchThread();
|
||||
|
||||
if (postKeyEventTask != null) {
|
||||
postKeyEventTask.cancel();
|
||||
postKeyEventTask = null;
|
||||
}
|
||||
}
|
||||
|
||||
private void initiateDelayedKeyRepeat(long keycode,
|
||||
int keyCodePoint,
|
||||
WLComponentPeer peer) {
|
||||
assert EventQueue.isDispatchThread();
|
||||
assert postKeyEventTask == null;
|
||||
|
||||
if (keyRepeatTimer == null) {
|
||||
// The following starts a dedicated daemon thread.
|
||||
keyRepeatTimer = new Timer("WLToolkit Key Repeat", true);
|
||||
}
|
||||
|
||||
postKeyEventTask = new PostKeyEventTask(keycode, keyCodePoint, peer);
|
||||
|
||||
assert WLToolkit.keyRepeatRate > 0;
|
||||
assert WLToolkit.keyRepeatDelay > 0;
|
||||
|
||||
keyRepeatTimer.schedule(
|
||||
postKeyEventTask,
|
||||
WLToolkit.keyRepeatDelay,
|
||||
(long)(1000.0 / WLToolkit.keyRepeatRate));
|
||||
}
|
||||
|
||||
static boolean xkbCodeRequiresRepeat(long code) {
|
||||
return !WLKeySym.xkbCodeIsModifier(code);
|
||||
}
|
||||
|
||||
void keyboardEvent(long keycode, int keyCodePoint,
|
||||
boolean isPressed, WLComponentPeer peer) {
|
||||
stopKeyRepeat();
|
||||
if (isPressed && KeyRepeatManager.xkbCodeRequiresRepeat(keycode)) {
|
||||
initiateDelayedKeyRepeat(keycode, keyCodePoint, peer);
|
||||
}
|
||||
}
|
||||
|
||||
void windowEvent(WindowEvent event) {
|
||||
if (event.getID() == WindowEvent.WINDOW_LOST_FOCUS) {
|
||||
stopKeyRepeat();
|
||||
}
|
||||
}
|
||||
|
||||
private static class PostKeyEventTask extends TimerTask {
|
||||
final long keycode;
|
||||
final int keyCodePoint;
|
||||
final WLComponentPeer peer;
|
||||
|
||||
PostKeyEventTask(long keycode,
|
||||
int keyCodePoint,
|
||||
WLComponentPeer peer) {
|
||||
this.keycode = keycode;
|
||||
this.keyCodePoint = keyCodePoint;
|
||||
this.peer = peer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
final long timestamp = System.currentTimeMillis();
|
||||
try {
|
||||
EventQueue.invokeAndWait(() -> {
|
||||
generateKeyEventFrom(timestamp, keycode, keyCodePoint, true, peer);
|
||||
});
|
||||
} catch (InterruptedException ignored) {
|
||||
} catch (InvocationTargetException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static final KeyRepeatManager keyRepeatManager = new KeyRepeatManager();
|
||||
|
||||
private static WLInputState inputState = WLInputState.initialState();
|
||||
private static WLKeyboard keyboard;
|
||||
|
||||
private static void dispatchPointerEvent(WLPointerEvent e) {
|
||||
// Invoked from the native code
|
||||
@@ -291,16 +402,20 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
|
||||
}
|
||||
}
|
||||
|
||||
private static void dispatchKeyboardKeyEvent(long timestamp,
|
||||
int id,
|
||||
int keyCode,
|
||||
int keyLocation,
|
||||
int rawCode,
|
||||
int extendedKeyCode,
|
||||
char keyChar) {
|
||||
private static void dispatchKeyboardKeyEvent(long serial,
|
||||
long timestamp,
|
||||
long keycode,
|
||||
int keyCodePoint, // UTF32 character
|
||||
boolean isPressed) {
|
||||
// Invoked from the native code
|
||||
assert EventQueue.isDispatchThread();
|
||||
|
||||
if (logKeys.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
logKeys.fine("dispatchKeyboardKeyEvent: keycode " + keycode + ", code point 0x"
|
||||
+ Integer.toHexString(keyCodePoint) + ", " + (isPressed ? "pressed" : "released")
|
||||
+ ", serial " + serial + ", timestamp " + timestamp);
|
||||
}
|
||||
|
||||
if (timestamp == 0) {
|
||||
// Happens when a surface was focused with keys already pressed.
|
||||
// Fake the timestamp by peeking at the last known event.
|
||||
@@ -310,25 +425,39 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
|
||||
final long surfacePtr = inputState.getSurfaceForKeyboardInput();
|
||||
final WLComponentPeer peer = componentPeerFromSurface(surfacePtr);
|
||||
if (peer != null) {
|
||||
if (extendedKeyCode >= 0x1000000) {
|
||||
int ch = extendedKeyCode - 0x1000000;
|
||||
int correctCode = KeyEvent.getExtendedKeyCodeForChar(ch);
|
||||
if (extendedKeyCode == keyCode) {
|
||||
keyCode = correctCode;
|
||||
}
|
||||
extendedKeyCode = correctCode;
|
||||
}
|
||||
generateKeyEventFrom(timestamp, keycode, keyCodePoint, isPressed, peer);
|
||||
keyRepeatManager.keyboardEvent(keycode, keyCodePoint, isPressed, peer);
|
||||
}
|
||||
}
|
||||
|
||||
postKeyEvent(
|
||||
peer.getTarget(),
|
||||
id,
|
||||
private static void generateKeyEventFrom(long timestamp, long keycode, int keyCodePoint,
|
||||
boolean isPressed, WLComponentPeer peer) {
|
||||
// See also XWindow.handleKeyPress()
|
||||
final char keyChar = Character.isBmpCodePoint(keyCodePoint)
|
||||
? (char) keyCodePoint
|
||||
: KeyEvent.CHAR_UNDEFINED;
|
||||
final WLKeySym.KeyDescriptor keyDescriptor = WLKeySym.KeyDescriptor.fromXKBCode(keycode);
|
||||
final int jkeyExtended = keyDescriptor.javaKeyCode() == KeyEvent.VK_UNDEFINED
|
||||
? primaryUnicodeToJavaKeycode(keyCodePoint)
|
||||
: keyDescriptor.javaKeyCode();
|
||||
postKeyEvent(peer.getTarget(),
|
||||
isPressed ? KeyEvent.KEY_PRESSED : KeyEvent.KEY_RELEASED,
|
||||
timestamp,
|
||||
keyDescriptor.javaKeyCode(),
|
||||
keyChar,
|
||||
keyDescriptor.keyLocation(),
|
||||
keycode,
|
||||
jkeyExtended);
|
||||
|
||||
if (isPressed && keyChar != 0 && keyChar != KeyEvent.CHAR_UNDEFINED) {
|
||||
postKeyEvent(peer.getTarget(),
|
||||
KeyEvent.KEY_TYPED,
|
||||
timestamp,
|
||||
keyCode,
|
||||
KeyEvent.VK_UNDEFINED,
|
||||
keyChar,
|
||||
keyLocation,
|
||||
rawCode,
|
||||
extendedKeyCode
|
||||
);
|
||||
KeyEvent.KEY_LOCATION_UNKNOWN,
|
||||
keycode,
|
||||
KeyEvent.VK_UNDEFINED);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -356,9 +485,32 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
|
||||
postEvent(keyEvent);
|
||||
}
|
||||
|
||||
private static void dispatchKeyboardModifiersEvent(long serial) {
|
||||
private static void dispatchKeyboardModifiersEvent(long serial,
|
||||
boolean isShiftActive,
|
||||
boolean isAltActive,
|
||||
boolean isCtrlActive,
|
||||
boolean isMetaActive,
|
||||
boolean isCapsActive,
|
||||
boolean isNumActive) {
|
||||
// Invoked from the native code
|
||||
assert EventQueue.isDispatchThread();
|
||||
inputState = inputState.updatedFromKeyboardModifiersEvent(serial, keyboard.getModifiers());
|
||||
|
||||
final int newModifiers =
|
||||
(isShiftActive ? InputEvent.SHIFT_DOWN_MASK : 0)
|
||||
| (isAltActive ? InputEvent.ALT_DOWN_MASK : 0)
|
||||
| (isCtrlActive ? InputEvent.CTRL_DOWN_MASK : 0)
|
||||
| (isMetaActive ? InputEvent.META_DOWN_MASK : 0);
|
||||
|
||||
final int newLockingKeyState =
|
||||
(isCapsActive ? CAPS_LOCK_MASK : 0)
|
||||
| (isNumActive ? NUM_LOCK_MASK : 0);
|
||||
|
||||
if (logKeys.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
logKeys.fine("dispatchKeyboardModifiersEvent: new modifiers 0x"
|
||||
+ Integer.toHexString(newModifiers));
|
||||
}
|
||||
|
||||
inputState = inputState.updatedFromKeyboardModifiersEvent(serial, newModifiers, newLockingKeyState);
|
||||
}
|
||||
|
||||
private static void dispatchKeyboardEnterEvent(long serial, long surfacePtr) {
|
||||
@@ -389,14 +541,13 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
|
||||
+ Long.toHexString(surfacePtr));
|
||||
}
|
||||
|
||||
keyboard.onLostFocus();
|
||||
|
||||
final WLInputState newInputState = inputState.updatedFromKeyboardLeaveEvent(serial, surfacePtr);
|
||||
final WLComponentPeer peer = componentPeerFromSurface(surfacePtr);
|
||||
if (peer != null && peer.getTarget() instanceof Window window) {
|
||||
final WindowEvent winLostFocusEvent = new WindowEvent(window, WindowEvent.WINDOW_LOST_FOCUS);
|
||||
WLKeyboardFocusManagerPeer.getInstance().setCurrentFocusedWindow(null);
|
||||
WLKeyboardFocusManagerPeer.getInstance().setCurrentFocusOwner(null);
|
||||
keyRepeatManager.windowEvent(winLostFocusEvent);
|
||||
postEvent(winLostFocusEvent);
|
||||
}
|
||||
inputState = newInputState;
|
||||
@@ -432,9 +583,7 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
|
||||
|
||||
@Override
|
||||
public void setDynamicLayout(boolean b) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.setDynamicLayout()");
|
||||
}
|
||||
log.info("Not implemented: WLToolkit.setDynamicLayout()");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -444,16 +593,12 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
|
||||
|
||||
@Override
|
||||
protected boolean isDynamicLayoutSet() {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.isDynamicLayoutSet()");
|
||||
}
|
||||
log.info("Not implemented: WLToolkit.isDynamicLayoutSet()");
|
||||
return false;
|
||||
}
|
||||
|
||||
protected boolean isDynamicLayoutSupported() {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.isDynamicLayoutSupported()");
|
||||
}
|
||||
log.info("Not implemented: WLToolkit.isDynamicLayoutSupported()");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -463,18 +608,14 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public FontPeer getFontPeer(String name, int style) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.getFontPeer()");
|
||||
}
|
||||
public FontPeer getFontPeer(String name, int style){
|
||||
log.info("Not implemented: WLToolkit.getFontPeer()");
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DragSourceContextPeer createDragSourceContextPeer(DragGestureEvent dge) throws InvalidDnDOperationException {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.createDragSourceContextPeer()");
|
||||
}
|
||||
log.info("Not implemented: WLToolkit.createDragSourceContextPeer()");
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -486,89 +627,67 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
|
||||
int srcActions,
|
||||
DragGestureListener dgl)
|
||||
{
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.createDragGestureRecognizer()");
|
||||
}
|
||||
log.info("Not implemented: WLToolkit.createDragGestureRecognizer()");
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CheckboxMenuItemPeer createCheckboxMenuItem(CheckboxMenuItem target) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.createCheckboxMenuItem()");
|
||||
}
|
||||
log.info("Not implemented: WLToolkit.createCheckboxMenuItem()");
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MenuItemPeer createMenuItem(MenuItem target) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.createMenuItem()");
|
||||
}
|
||||
log.info("Not implemented: WLToolkit.createMenuItem()");
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextFieldPeer createTextField(TextField target) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.createTextField()");
|
||||
}
|
||||
log.info("Not implemented: WLToolkit.createTextField()");
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LabelPeer createLabel(Label target) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.createLabel()");
|
||||
}
|
||||
log.info("Not implemented: WLToolkit.createLabel()");
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ListPeer createList(java.awt.List target) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.createList()");
|
||||
}
|
||||
log.info("Not implemented: WLToolkit.createList()");
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CheckboxPeer createCheckbox(Checkbox target) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.createCheckbox()");
|
||||
}
|
||||
log.info("Not implemented: WLToolkit.createCheckbox()");
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ScrollbarPeer createScrollbar(Scrollbar target) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.createScrollbar()");
|
||||
}
|
||||
log.info("Not implemented: WLToolkit.createScrollbar()");
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ScrollPanePeer createScrollPane(ScrollPane target) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.createScrollPane()");
|
||||
}
|
||||
log.info("Not implemented: WLToolkit.createScrollPane()");
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextAreaPeer createTextArea(TextArea target) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.createTextArea()");
|
||||
}
|
||||
log.info("Not implemented: WLToolkit.createTextArea()");
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChoicePeer createChoice(Choice target) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.createChoice()");
|
||||
}
|
||||
log.info("Not implemented: WLToolkit.createChoice()");
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -581,9 +700,7 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
|
||||
|
||||
@Override
|
||||
public PanelPeer createPanel(Panel target) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.createPanel()");
|
||||
}
|
||||
log.info("Not implemented: WLToolkit.createPanel()");
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -603,33 +720,25 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
|
||||
|
||||
@Override
|
||||
public FileDialogPeer createFileDialog(FileDialog target) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.createFileDialog()");
|
||||
}
|
||||
log.info("Not implemented: WLToolkit.createFileDialog()");
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MenuBarPeer createMenuBar(MenuBar target) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.createMenuBar()");
|
||||
}
|
||||
log.info("Not implemented: WLToolkit.createMenuBar()");
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MenuPeer createMenu(Menu target) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.createMenu()");
|
||||
}
|
||||
log.info("Not implemented: WLToolkit.createMenu()");
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PopupMenuPeer createPopupMenu(PopupMenu target) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.createPopupMenu()");
|
||||
}
|
||||
log.info("Not implemented: WLToolkit.createPopupMenu()");
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -653,26 +762,22 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public TrayIconPeer createTrayIcon(TrayIcon target) throws HeadlessException {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.createTrayIcon()");
|
||||
}
|
||||
public TrayIconPeer createTrayIcon(TrayIcon target)
|
||||
throws HeadlessException
|
||||
{
|
||||
log.info("Not implemented: WLToolkit.createTrayIcon()");
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SystemTrayPeer createSystemTray(SystemTray target) throws HeadlessException {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.createSystemTray()");
|
||||
}
|
||||
log.info("Not implemented: WLToolkit.createSystemTray()");
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isTraySupported() {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.isTraySupported()");
|
||||
}
|
||||
log.info("Not implemented: WLToolkit.isTraySupported()");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -694,16 +799,14 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
|
||||
|
||||
@Override
|
||||
public Map<TextAttribute, ?> mapInputMethodHighlight( InputMethodHighlight highlight) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.mapInputMethodHighlight()");
|
||||
}
|
||||
log.info("Not implemented: WLToolkit.mapInputMethodHighlight()");
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public boolean getLockingKeyState(int key) {
|
||||
return switch (key) {
|
||||
case KeyEvent.VK_CAPS_LOCK -> keyboard.isCapsLockPressed();
|
||||
case KeyEvent.VK_NUM_LOCK -> keyboard.isNumLockPressed();
|
||||
case KeyEvent.VK_CAPS_LOCK -> (inputState.lockingKeyState() & CAPS_LOCK_MASK) != 0;
|
||||
case KeyEvent.VK_NUM_LOCK -> (inputState.lockingKeyState() & NUM_LOCK_MASK) != 0;
|
||||
case KeyEvent.VK_SCROLL_LOCK, KeyEvent.VK_KANA_LOCK ->
|
||||
throw new UnsupportedOperationException("getting locking key state is not supported for this key");
|
||||
default -> throw new IllegalArgumentException("invalid key for Toolkit.getLockingKeyState");
|
||||
@@ -733,17 +836,13 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
|
||||
|
||||
@Override
|
||||
public void beep() {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.beep()");
|
||||
}
|
||||
log.info("Not implemented: WLToolkit.beep()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public PrintJob getPrintJob(final Frame frame, final String doctitle,
|
||||
final Properties props) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.getPrintJob()");
|
||||
}
|
||||
log.info("Not implemented: WLToolkit.getPrintJob()");
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -752,9 +851,7 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
|
||||
final JobAttributes jobAttributes,
|
||||
final PageAttributes pageAttributes)
|
||||
{
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.getPrintJob()");
|
||||
}
|
||||
log.info("Not implemented: WLToolkit.getPrintJob()");
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -769,9 +866,7 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
|
||||
*/
|
||||
@Override
|
||||
public InputMethodDescriptor getInputMethodAdapterDescriptor() {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.getInputMethodAdapterDescriptor()");
|
||||
}
|
||||
log.info("Not implemented: WLToolkit.getInputMethodAdapterDescriptor()");
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -781,9 +876,7 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
|
||||
*/
|
||||
@Override
|
||||
public boolean enableInputMethodsForTextComponent() {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.enableInputMethodsForTextComponent()");
|
||||
}
|
||||
log.info("Not implemented: WLToolkit.enableInputMethodsForTextComponent()");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -823,17 +916,13 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
|
||||
|
||||
@Override
|
||||
protected Object lazilyLoadDesktopProperty(String name) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.lazilyLoadDesktopProperty()");
|
||||
}
|
||||
log.info("Not implemented: WLToolkit.lazilyLoadDesktopProperty()");
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void addPropertyChangeListener(String name, PropertyChangeListener pcl) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.addPropertyChangeListener()");
|
||||
}
|
||||
log.info("Not implemented: WLToolkit.addPropertyChangeListener()");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -841,9 +930,7 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
|
||||
*/
|
||||
@Override
|
||||
protected boolean needsXEmbedImpl() {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.needsXEmbedImpl()");
|
||||
}
|
||||
log.info("Not implemented: WLToolkit.needsXEmbedImpl()");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -855,9 +942,7 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
|
||||
|
||||
@Override
|
||||
public boolean isModalExclusionTypeSupported(Dialog.ModalExclusionType exclusionType) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.isModalExclusionTypeSupported()");
|
||||
}
|
||||
log.info("Not implemented: WLToolkit.isModalExclusionTypeSupported()");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -868,9 +953,7 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
|
||||
|
||||
@Override
|
||||
public boolean useBufferPerWindow() {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.useBufferPerWindow()");
|
||||
}
|
||||
log.info("Not implemented: WLToolkit.useBufferPerWindow()");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -879,24 +962,18 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
|
||||
*/
|
||||
@Override
|
||||
protected boolean syncNativeQueue(long timeout) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.syncNativeQueue()");
|
||||
}
|
||||
log.info("Not implemented: WLToolkit.syncNativeQueue()");
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void grab(Window w) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.grab()");
|
||||
}
|
||||
log.info("Not implemented: WLToolkit.grab()");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ungrab(Window w) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.ungrab()");
|
||||
}
|
||||
log.info("Not implemented: WLToolkit.ungrab()");
|
||||
}
|
||||
/**
|
||||
* Returns if the java.awt.Desktop class is supported on the current
|
||||
@@ -906,34 +983,26 @@ public class WLToolkit extends UNIXToolkit implements Runnable {
|
||||
* Check if the running desktop is Gnome by checking the window manager.
|
||||
*/
|
||||
@Override
|
||||
public boolean isDesktopSupported() {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.isDesktopSupported()");
|
||||
}
|
||||
public boolean isDesktopSupported(){
|
||||
log.info("Not implemented: WLToolkit.isDesktopSupported()");
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DesktopPeer createDesktopPeer(Desktop target) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.createDesktopPeer()");
|
||||
}
|
||||
public DesktopPeer createDesktopPeer(Desktop target){
|
||||
log.info("Not implemented: WLToolkit.createDesktopPeer()");
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isTaskbarSupported() {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.isTaskbarSupported()");
|
||||
}
|
||||
public boolean isTaskbarSupported(){
|
||||
log.info("Not implemented: WLToolkit.isTaskbarSupported()");
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TaskbarPeer createTaskbarPeer(Taskbar target) {
|
||||
if (log.isLoggable(PlatformLogger.Level.FINE)) {
|
||||
log.fine("Not implemented: WLToolkit.createTaskbarPeer()");
|
||||
}
|
||||
public TaskbarPeer createTaskbarPeer(Taskbar target){
|
||||
log.info("Not implemented: WLToolkit.createTaskbarPeer()");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -80,12 +80,7 @@ public class WLSMSurfaceData extends SurfaceData implements WLSurfaceDataExt {
|
||||
|
||||
@Override
|
||||
public SurfaceData getReplacement() {
|
||||
// It does not seem possible in Wayland to get your window's surface
|
||||
// change mid-flight such that it needs a replacement.
|
||||
// The only scenario when a surface gets forcibly invalidated is
|
||||
// after WLComponentPeer.dispose(), at which point the surface
|
||||
// is no longer needed anyway.
|
||||
return null;
|
||||
throw new UnsupportedOperationException("Not implemented yet");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,89 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2023, JetBrains s.r.o.. All rights reserved.
|
||||
*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
#include "memory_utils.h"
|
||||
|
||||
#include <unistd.h>
|
||||
#include <time.h>
|
||||
#include <string.h>
|
||||
#include <sys/mman.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
static void
|
||||
RandomName(char *buf) {
|
||||
struct timespec ts;
|
||||
clock_gettime(CLOCK_REALTIME, &ts);
|
||||
long r = ts.tv_nsec;
|
||||
while (*buf) {
|
||||
*buf++ = 'A' + (r & 15) + (r & 16) * 2;
|
||||
r >>= 5;
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
CreateSharedMemoryFile(const char* baseName) {
|
||||
// constructing the full name of the form /baseName-XXXXXX
|
||||
int baseLen = strlen(baseName);
|
||||
char *name = (char*) malloc(baseLen + 9);
|
||||
if (!name)
|
||||
return -1;
|
||||
name[0] = '/';
|
||||
strcpy(name + 1, baseName);
|
||||
strcpy(name + baseLen + 1, "-XXXXXX");
|
||||
|
||||
int retries = 100;
|
||||
do {
|
||||
RandomName(name + baseLen + 2);
|
||||
--retries;
|
||||
int fd = shm_open(name, O_RDWR | O_CREAT | O_EXCL, 0600);
|
||||
if (fd >= 0) {
|
||||
shm_unlink(name);
|
||||
free(name);
|
||||
return fd;
|
||||
}
|
||||
} while (retries > 0 && errno == EEXIST);
|
||||
free(name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int
|
||||
AllocateSharedMemoryFile(size_t size, const char* baseName) {
|
||||
int fd = CreateSharedMemoryFile(baseName);
|
||||
if (fd < 0)
|
||||
return -1;
|
||||
int ret;
|
||||
do {
|
||||
ret = ftruncate(fd, size);
|
||||
} while (ret < 0 && errno == EINTR);
|
||||
if (ret < 0) {
|
||||
close(fd);
|
||||
return -1;
|
||||
}
|
||||
return fd;
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2023, JetBrains s.r.o.. All rights reserved.
|
||||
*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
#ifndef MEMORY_UTILS_H
|
||||
#define MEMORY_UTILS_H
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
int
|
||||
AllocateSharedMemoryFile(size_t size, const char* baseName);
|
||||
|
||||
#endif // MEMORY_UTILS_H
|
||||
@@ -519,7 +519,6 @@ announceMimeTypesForSource(
|
||||
(*env)->ReleaseStringUTFChars(env, s, mimeType);
|
||||
(*env)->DeleteLocalRef(env, s);
|
||||
}
|
||||
wlFlushToServer(env);
|
||||
|
||||
return JNI_TRUE;
|
||||
}
|
||||
@@ -575,7 +574,6 @@ offerData(
|
||||
(struct wl_data_source *)source,
|
||||
eventSerial);
|
||||
}
|
||||
wlFlushToServer(env);
|
||||
}
|
||||
|
||||
return source != NULL;
|
||||
@@ -629,7 +627,6 @@ Java_sun_awt_wl_WLClipboard_cancelOffer(
|
||||
} else {
|
||||
wl_data_device_set_selection(wl_data_device, NULL, eventSerial);
|
||||
}
|
||||
wlFlushToServer(env);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -665,10 +662,6 @@ Java_sun_awt_wl_WLClipboard_requestDataInFormat(
|
||||
struct wl_data_offer * offer = jlong_to_ptr(clipboardNativePtr);
|
||||
wl_data_offer_receive(offer, mimeType, fds[1]);
|
||||
}
|
||||
// Since the request for the clipboard contents can and usually is blocking,
|
||||
// make sure that the server has received it right away.
|
||||
wlFlushToServer(env);
|
||||
|
||||
close(fds[1]); // close the "sender" end of the pipe
|
||||
fd = fds[0];
|
||||
}
|
||||
|
||||
@@ -291,8 +291,6 @@ xdg_activation_token_v1_done(void *data,
|
||||
assert(surface);
|
||||
xdg_activation_v1_activate(xdg_activation_v1, token, surface);
|
||||
frame->activation_token_list = delete_token(frame->activation_token_list, xdg_activation_token_v1);
|
||||
JNIEnv* env = getEnv();
|
||||
wlFlushToServer(env);
|
||||
}
|
||||
|
||||
static const struct xdg_activation_token_v1_listener xdg_activation_token_v1_listener = {
|
||||
@@ -380,7 +378,6 @@ Java_sun_awt_wl_WLComponentPeer_nativeRequestMinimized
|
||||
struct WLFrame *frame = jlong_to_ptr(ptr);
|
||||
if (frame->xdg_toplevel) {
|
||||
xdg_toplevel_set_minimized(frame->xdg_toplevel);
|
||||
wlFlushToServer(env);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -391,7 +388,6 @@ Java_sun_awt_wl_WLComponentPeer_nativeRequestMaximized
|
||||
struct WLFrame *frame = jlong_to_ptr(ptr);
|
||||
if (frame->xdg_toplevel) {
|
||||
xdg_toplevel_set_maximized(frame->xdg_toplevel);
|
||||
wlFlushToServer(env);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -402,7 +398,6 @@ Java_sun_awt_wl_WLComponentPeer_nativeRequestUnmaximized
|
||||
struct WLFrame *frame = jlong_to_ptr(ptr);
|
||||
if (frame->xdg_toplevel) {
|
||||
xdg_toplevel_unset_maximized(frame->xdg_toplevel);
|
||||
wlFlushToServer(env);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -414,7 +409,6 @@ Java_sun_awt_wl_WLComponentPeer_nativeRequestFullScreen
|
||||
if (frame->xdg_toplevel) {
|
||||
struct wl_output *wl_output = WLOutputByID((uint32_t)wlID);
|
||||
xdg_toplevel_set_fullscreen(frame->xdg_toplevel, wl_output);
|
||||
wlFlushToServer(env);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -425,7 +419,6 @@ Java_sun_awt_wl_WLComponentPeer_nativeRequestUnsetFullScreen
|
||||
struct WLFrame *frame = jlong_to_ptr(ptr);
|
||||
if (frame->xdg_toplevel) {
|
||||
xdg_toplevel_unset_fullscreen(frame->xdg_toplevel);
|
||||
wlFlushToServer(env);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -477,7 +470,6 @@ Java_sun_awt_wl_WLComponentPeer_nativeCreateWLSurface
|
||||
// setting it up, the client must perform an initial commit
|
||||
// without any buffer attached"
|
||||
wl_surface_commit(frame->wl_surface);
|
||||
wlFlushToServer(env);
|
||||
}
|
||||
|
||||
static struct xdg_positioner *
|
||||
@@ -497,7 +489,7 @@ newPositioner
|
||||
xdg_positioner_set_anchor(xdg_positioner, XDG_POSITIONER_ANCHOR_TOP_LEFT);
|
||||
xdg_positioner_set_gravity(xdg_positioner, XDG_POSITIONER_GRAVITY_BOTTOM_RIGHT);
|
||||
xdg_positioner_set_constraint_adjustment(xdg_positioner, XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_SLIDE_X |
|
||||
XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_SLIDE_Y);
|
||||
XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_FLIP_Y);
|
||||
return xdg_positioner;
|
||||
}
|
||||
|
||||
@@ -534,7 +526,6 @@ Java_sun_awt_wl_WLComponentPeer_nativeCreateWLPopup
|
||||
// setting it up, the client must perform an initial commit
|
||||
// without any buffer attached"
|
||||
wl_surface_commit(frame->wl_surface);
|
||||
wlFlushToServer(env);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
@@ -555,12 +546,11 @@ Java_sun_awt_wl_WLComponentPeer_nativeRepositionWLPopup
|
||||
static int token = 42; // This will be received by xdg_popup_repositioned(); unused for now.
|
||||
xdg_popup_reposition(frame->xdg_popup, xdg_positioner, token++);
|
||||
xdg_positioner_destroy(xdg_positioner);
|
||||
wlFlushToServer(env);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
DoHide(JNIEnv *env, struct WLFrame *frame)
|
||||
DoHide(struct WLFrame *frame)
|
||||
{
|
||||
if (frame->wl_surface) {
|
||||
if(frame->toplevel) {
|
||||
@@ -577,8 +567,6 @@ DoHide(JNIEnv *env, struct WLFrame *frame)
|
||||
xdg_surface_destroy(frame->xdg_surface);
|
||||
wl_surface_destroy(frame->wl_surface);
|
||||
delete_all_tokens(frame->activation_token_list);
|
||||
wlFlushToServer(env);
|
||||
|
||||
frame->activation_token_list = NULL;
|
||||
frame->wl_surface = NULL;
|
||||
frame->xdg_surface = NULL;
|
||||
@@ -593,7 +581,7 @@ Java_sun_awt_wl_WLComponentPeer_nativeHideFrame
|
||||
(JNIEnv *env, jobject obj, jlong ptr)
|
||||
{
|
||||
struct WLFrame *frame = jlong_to_ptr(ptr);
|
||||
DoHide(env, frame);
|
||||
DoHide(frame);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
@@ -601,7 +589,7 @@ Java_sun_awt_wl_WLComponentPeer_nativeDisposeFrame
|
||||
(JNIEnv *env, jobject obj, jlong ptr)
|
||||
{
|
||||
struct WLFrame *frame = jlong_to_ptr(ptr);
|
||||
DoHide(env, frame);
|
||||
DoHide(frame);
|
||||
(*env)->DeleteWeakGlobalRef(env, frame->nativeFramePeer);
|
||||
free(frame);
|
||||
}
|
||||
@@ -618,7 +606,6 @@ JNIEXPORT void JNICALL Java_sun_awt_wl_WLComponentPeer_nativeStartDrag
|
||||
struct WLFrame *frame = jlong_to_ptr(ptr);
|
||||
if (frame->toplevel && wl_seat) {
|
||||
xdg_toplevel_move(frame->xdg_toplevel, wl_seat, last_mouse_pressed_serial);
|
||||
wlFlushToServer(env);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -628,7 +615,6 @@ JNIEXPORT void JNICALL Java_sun_awt_wl_WLComponentPeer_nativeStartResize
|
||||
struct WLFrame *frame = jlong_to_ptr(ptr);
|
||||
if (frame->toplevel && wl_seat && frame->xdg_toplevel != NULL) {
|
||||
xdg_toplevel_resize(frame->xdg_toplevel, wl_seat, last_mouse_pressed_serial, edges);
|
||||
wlFlushToServer(env);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -638,7 +624,6 @@ JNIEXPORT void JNICALL Java_sun_awt_wl_WLComponentPeer_nativeSetWindowGeometry
|
||||
struct WLFrame *frame = jlong_to_ptr(ptr);
|
||||
if (frame->xdg_surface) {
|
||||
xdg_surface_set_window_geometry(frame->xdg_surface, x, y, width, height);
|
||||
wlFlushToServer(env);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -648,7 +633,6 @@ JNIEXPORT void JNICALL Java_sun_awt_wl_WLComponentPeer_nativeSetMinimumSize
|
||||
struct WLFrame *frame = jlong_to_ptr(ptr);
|
||||
if (frame->toplevel) {
|
||||
xdg_toplevel_set_min_size(frame->xdg_toplevel, width, height);
|
||||
wlFlushToServer(env);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -658,7 +642,6 @@ JNIEXPORT void JNICALL Java_sun_awt_wl_WLComponentPeer_nativeSetMaximumSize
|
||||
struct WLFrame *frame = jlong_to_ptr(ptr);
|
||||
if (frame->toplevel) {
|
||||
xdg_toplevel_set_max_size(frame->xdg_toplevel, width, height);
|
||||
wlFlushToServer(env);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -668,7 +651,6 @@ JNIEXPORT void JNICALL Java_sun_awt_wl_WLComponentPeer_nativeShowWindowMenu
|
||||
struct WLFrame *frame = jlong_to_ptr(ptr);
|
||||
if (frame->toplevel) {
|
||||
xdg_toplevel_show_window_menu(frame->xdg_toplevel, wl_seat, last_mouse_pressed_serial, x, y);
|
||||
wlFlushToServer(env);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -687,6 +669,5 @@ Java_sun_awt_wl_WLComponentPeer_nativeActivate
|
||||
}
|
||||
xdg_activation_token_v1_commit(token);
|
||||
frame->activation_token_list = add_token(env, frame->activation_token_list, token);
|
||||
wlFlushToServer(env);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include <jni_util.h>
|
||||
|
||||
#include "WLToolkit.h"
|
||||
#include "WLGraphicsEnvironment.h"
|
||||
|
||||
struct WLCursor {
|
||||
struct wl_buffer *buffer;
|
||||
@@ -59,18 +58,16 @@ Java_java_awt_Cursor_finalizeImpl
|
||||
}
|
||||
|
||||
JNIEXPORT jlong JNICALL Java_sun_awt_wl_WLComponentPeer_nativeGetPredefinedCursor
|
||||
(JNIEnv *env, jclass cls, jstring name, jint scale)
|
||||
(JNIEnv *env, jclass cls, jstring name)
|
||||
{
|
||||
struct wl_cursor_theme *cursor_theme = getCursorTheme(scale);
|
||||
|
||||
if (!cursor_theme)
|
||||
if (!wl_cursor_theme)
|
||||
return 0;
|
||||
|
||||
jboolean isCopy = JNI_FALSE;
|
||||
const char *name_c_str = JNU_GetStringPlatformChars(env, name, &isCopy);
|
||||
if (!name_c_str)
|
||||
return 0;
|
||||
struct wl_cursor *wl_cursor = wl_cursor_theme_get_cursor(cursor_theme, name_c_str);
|
||||
struct wl_cursor *wl_cursor = wl_cursor_theme_get_cursor(wl_cursor_theme, name_c_str);
|
||||
if (isCopy) {
|
||||
JNU_ReleaseStringPlatformChars(env, name, name_c_str);
|
||||
}
|
||||
@@ -91,12 +88,6 @@ JNIEXPORT jlong JNICALL Java_sun_awt_wl_WLComponentPeer_nativeGetPredefinedCurso
|
||||
return ptr_to_jlong(cursor);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_sun_awt_wl_WLComponentPeer_nativeDestroyPredefinedCursor
|
||||
(JNIEnv *env, jclass cls, struct WLCursor *cursor)
|
||||
{
|
||||
free(cursor);
|
||||
}
|
||||
|
||||
JNIEXPORT jlong JNICALL Java_sun_awt_wl_WLCustomCursor_nativeCreateCustomCursor
|
||||
(JNIEnv *env, jclass cls, jintArray pixels, jint width, jint height, jint xHotSpot, jint yHotSpot)
|
||||
{
|
||||
@@ -140,7 +131,7 @@ JNIEXPORT jlong JNICALL Java_sun_awt_wl_WLCustomCursor_nativeCreateCustomCursor
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_sun_awt_wl_WLComponentPeer_nativeSetCursor
|
||||
(JNIEnv *env, jclass cls, jlong pData, jint scale)
|
||||
(JNIEnv *env, jclass cls, jlong pData)
|
||||
{
|
||||
struct wl_buffer *buffer = NULL;
|
||||
int32_t width = 0;
|
||||
@@ -170,7 +161,6 @@ JNIEXPORT void JNICALL Java_sun_awt_wl_WLComponentPeer_nativeSetCursor
|
||||
if (buffer != last_buffer) {
|
||||
last_buffer = buffer;
|
||||
wl_surface_attach(wl_cursor_surface, buffer, 0, 0);
|
||||
wl_surface_set_buffer_scale(wl_cursor_surface, scale);
|
||||
wl_surface_damage_buffer(wl_cursor_surface, 0, 0, width, height);
|
||||
wl_surface_commit(wl_cursor_surface);
|
||||
}
|
||||
@@ -179,8 +169,6 @@ JNIEXPORT void JNICALL Java_sun_awt_wl_WLComponentPeer_nativeSetCursor
|
||||
last_serial = last_pointer_enter_serial;
|
||||
last_hotspot_x = hotspot_x;
|
||||
last_hotspot_y = hotspot_y;
|
||||
wl_pointer_set_cursor(wl_pointer, last_pointer_enter_serial, wl_cursor_surface,
|
||||
hotspot_x / scale, hotspot_y / scale);
|
||||
wlFlushToServer(env);
|
||||
wl_pointer_set_cursor(wl_pointer, last_pointer_enter_serial, wl_cursor_surface, hotspot_x, hotspot_y);
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,50 +0,0 @@
|
||||
// Copyright 2023 JetBrains s.r.o.
|
||||
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
//
|
||||
// This code is free software; you can redistribute it and/or modify it
|
||||
// under the terms of the GNU General Public License version 2 only, as
|
||||
// published by the Free Software Foundation. Oracle designates this
|
||||
// particular file as subject to the "Classpath" exception as provided
|
||||
// by Oracle in the LICENSE file that accompanied this code.
|
||||
//
|
||||
// This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
// version 2 for more details (a copy is included in the LICENSE file that
|
||||
// accompanied this code).
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License version
|
||||
// 2 along with this work; if not, write to the Free Software Foundation,
|
||||
// Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
//
|
||||
// Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
// or visit www.oracle.com if you need additional information or have any
|
||||
// questions.
|
||||
|
||||
#ifndef WLKEYBOARD_H_INCLUDED
|
||||
#define WLKEYBOARD_H_INCLUDED
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <jvm_md.h>
|
||||
#include <jni_util.h>
|
||||
|
||||
bool wlInitKeyboard(JNIEnv* env);
|
||||
|
||||
struct WLKeyEvent {
|
||||
long timestamp;
|
||||
int id;
|
||||
int keyCode;
|
||||
int keyLocation;
|
||||
int rawCode;
|
||||
int extendedKeyCode;
|
||||
uint16_t keyChar;
|
||||
};
|
||||
|
||||
void wlSetKeymap(const char* serializedKeymap);
|
||||
void wlSetKeyState(long timestamp, uint32_t keycode, bool isPressed);
|
||||
void wlSetRepeatInfo(int charsPerSecond, int delayMillis);
|
||||
void wlSetModifiers(uint32_t depressed, uint32_t latched, uint32_t locked, uint32_t group);
|
||||
void wlPostKeyEvent(const struct WLKeyEvent* event);
|
||||
|
||||
#endif
|
||||
@@ -476,7 +476,6 @@ Java_sun_awt_wl_WLRobotPeer_sendJavaKeyImpl
|
||||
}
|
||||
|
||||
wakefield_send_key(wakefield, key, pressed ? 1 : 0);
|
||||
wlFlushToServer(env);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -491,7 +490,6 @@ Java_sun_awt_wl_WLRobotPeer_mouseMoveImpl
|
||||
}
|
||||
|
||||
wakefield_send_cursor(wakefield, x, y);
|
||||
wlFlushToServer(env);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -510,7 +508,6 @@ Java_sun_awt_wl_WLRobotPeer_sendMouseButtonImpl
|
||||
wakefield_send_button(wakefield, item->wayland_button_code, pressed ? 1 : 0);
|
||||
}
|
||||
}
|
||||
wlFlushToServer(env);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -525,30 +522,6 @@ Java_sun_awt_wl_WLRobotPeer_mouseWheelImpl
|
||||
}
|
||||
|
||||
wakefield_send_wheel(wakefield, amount);
|
||||
wlFlushToServer(env);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_sun_awt_wl_WLRobotPeer_setXKBLayout(JNIEnv *env, jclass cls, jstring jLayout, jstring jVariant, jstring jOptions)
|
||||
{
|
||||
#ifdef WAKEFIELD_ROBOT
|
||||
if (!wakefield) {
|
||||
JNU_ThrowByName(env, "java/awt/AWTError", "no 'wakefield' protocol extension");
|
||||
return;
|
||||
}
|
||||
|
||||
const char* layout = (*env)->GetStringUTFChars(env, jLayout, NULL);
|
||||
const char* variant = (*env)->GetStringUTFChars(env, jVariant, NULL);
|
||||
const char* options = (*env)->GetStringUTFChars(env, jOptions, NULL);
|
||||
|
||||
wakefield_set_xkb_rule_names(wakefield, "evdev", "pc105", layout, variant, options);
|
||||
wlFlushToServer(env);
|
||||
|
||||
(*env)->ReleaseStringUTFChars(env, jOptions, options);
|
||||
(*env)->ReleaseStringUTFChars(env, jVariant, variant);
|
||||
(*env)->ReleaseStringUTFChars(env, jLayout, layout);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -28,10 +28,8 @@
|
||||
#error This file should not be included in headless library
|
||||
#endif
|
||||
|
||||
#include <WLToolkit.h>
|
||||
#include <WLKeyboard.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <dlfcn.h>
|
||||
#include <string.h>
|
||||
#include <poll.h>
|
||||
#include <errno.h>
|
||||
@@ -40,7 +38,6 @@
|
||||
#include <sys/mman.h>
|
||||
#include <unistd.h>
|
||||
#include <time.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include "gtk-shell1-client-protocol.h"
|
||||
|
||||
@@ -48,10 +45,9 @@
|
||||
#include "JNIUtilities.h"
|
||||
#include "awt.h"
|
||||
#include "sun_awt_wl_WLToolkit.h"
|
||||
#include "WLToolkit.h"
|
||||
#include "WLRobotPeer.h"
|
||||
#include "WLGraphicsEnvironment.h"
|
||||
#include "memory_utils.h"
|
||||
#include "java_awt_event_KeyEvent.h"
|
||||
|
||||
#ifdef WAKEFIELD_ROBOT
|
||||
#include "wakefield-client-protocol.h"
|
||||
@@ -71,8 +67,7 @@ struct wl_seat *wl_seat = NULL;
|
||||
struct wl_keyboard *wl_keyboard;
|
||||
struct wl_pointer *wl_pointer;
|
||||
|
||||
#define MAX_CURSOR_SCALE 100
|
||||
struct wl_cursor_theme *cursor_themes[MAX_CURSOR_SCALE] = {NULL};
|
||||
struct wl_cursor_theme *wl_cursor_theme = NULL;
|
||||
|
||||
struct wl_surface *wl_surface_in_focus = NULL;
|
||||
struct wl_data_device_manager *wl_ddm = NULL;
|
||||
@@ -111,11 +106,129 @@ static jfieldID isButtonPressedFID;
|
||||
static jfieldID axis_0_validFID;
|
||||
static jfieldID axis_0_valueFID;
|
||||
|
||||
static jfieldID keyRepeatRateFID;
|
||||
static jfieldID keyRepeatDelayFID;
|
||||
|
||||
static jmethodID dispatchKeyboardKeyEventMID;
|
||||
static jmethodID dispatchKeyboardModifiersEventMID;
|
||||
static jmethodID dispatchKeyboardEnterEventMID;
|
||||
static jmethodID dispatchKeyboardLeaveEventMID;
|
||||
|
||||
struct xkb_state *xkb_state;
|
||||
struct xkb_context *xkb_context;
|
||||
struct xkb_keymap *xkb_keymap;
|
||||
|
||||
typedef uint32_t xkb_mod_mask_t;
|
||||
typedef uint32_t xkb_layout_index_t;
|
||||
typedef uint32_t xkb_keycode_t;
|
||||
typedef uint32_t xkb_keysym_t;
|
||||
|
||||
enum xkb_state_component {
|
||||
XKB_STATE_MODS_DEPRESSED = (1 << 0),
|
||||
XKB_STATE_MODS_LATCHED = (1 << 1),
|
||||
XKB_STATE_MODS_LOCKED = (1 << 2),
|
||||
XKB_STATE_MODS_EFFECTIVE = (1 << 3),
|
||||
XKB_STATE_LAYOUT_DEPRESSED = (1 << 4),
|
||||
XKB_STATE_LAYOUT_LATCHED = (1 << 5),
|
||||
XKB_STATE_LAYOUT_LOCKED = (1 << 6),
|
||||
XKB_STATE_LAYOUT_EFFECTIVE = (1 << 7),
|
||||
XKB_STATE_LEDS = (1 << 8)
|
||||
};
|
||||
|
||||
enum xkb_keymap_format {
|
||||
XKB_KEYMAP_FORMAT_TEXT_V1 = 1
|
||||
};
|
||||
|
||||
#define XKB_MOD_NAME_SHIFT "Shift"
|
||||
#define XKB_MOD_NAME_CAPS "Lock"
|
||||
#define XKB_MOD_NAME_CTRL "Control"
|
||||
#define XKB_MOD_NAME_ALT "Mod1"
|
||||
#define XKB_MOD_NAME_NUM "Mod2"
|
||||
#define XKB_MOD_NAME_LOGO "Mod4"
|
||||
|
||||
#define XKB_LED_NAME_CAPS "Caps Lock"
|
||||
#define XKB_LED_NAME_NUM "Num Lock"
|
||||
#define XKB_LED_NAME_SCROLL "Scroll Lock"
|
||||
|
||||
static struct {
|
||||
void * handle;
|
||||
|
||||
struct xkb_context * (*xkb_context_new)(int);
|
||||
struct xkb_keymap * (*xkb_keymap_new_from_string)(
|
||||
struct xkb_context *context,
|
||||
const char *string,
|
||||
int format,
|
||||
int flags);
|
||||
void (*xkb_keymap_unref)(struct xkb_keymap *keymap);
|
||||
void (*xkb_state_unref)(struct xkb_state *state);
|
||||
struct xkb_state * (*xkb_state_new)(struct xkb_keymap *keymap);
|
||||
xkb_keysym_t (*xkb_state_key_get_one_sym)(struct xkb_state *state, xkb_keycode_t key);
|
||||
uint32_t (*xkb_state_key_get_utf32)(struct xkb_state *state, xkb_keycode_t key);
|
||||
int (*xkb_state_update_mask)(
|
||||
struct xkb_state *state,
|
||||
xkb_mod_mask_t depressed_mods,
|
||||
xkb_mod_mask_t latched_mods,
|
||||
xkb_mod_mask_t locked_mods,
|
||||
xkb_layout_index_t depressed_layout,
|
||||
xkb_layout_index_t latched_layout,
|
||||
xkb_layout_index_t locked_layout);
|
||||
int (*xkb_state_mod_name_is_active)(
|
||||
struct xkb_state *state,
|
||||
const char *name,
|
||||
enum xkb_state_component type);
|
||||
} xkb_ifs;
|
||||
|
||||
static inline void
|
||||
clear_dlerror(void)
|
||||
{
|
||||
(void)dlerror();
|
||||
}
|
||||
|
||||
static void *
|
||||
xkbcommon_bind_sym(JNIEnv *env, const char* sym_name)
|
||||
{
|
||||
clear_dlerror();
|
||||
void * sym_addr = dlsym(xkb_ifs.handle, sym_name);
|
||||
if (!sym_addr) {
|
||||
const char *dlsym_error = dlerror();
|
||||
JNU_ThrowByName(env, "java/lang/UnsatisfiedLinkError", dlsym_error);
|
||||
}
|
||||
|
||||
return sym_addr;
|
||||
}
|
||||
|
||||
#define BIND_XKB_SYM(name) xkb_ifs.name = xkbcommon_bind_sym(env, #name); \
|
||||
if (!xkb_ifs.name) return false;
|
||||
|
||||
static bool
|
||||
xkbcommon_load(JNIEnv *env)
|
||||
{
|
||||
void * handle = dlopen(JNI_LIB_NAME("xkbcommon"), RTLD_LAZY | RTLD_LOCAL);
|
||||
if (!handle) {
|
||||
handle = dlopen(VERSIONED_JNI_LIB_NAME("xkbcommon", "0"), RTLD_LAZY | RTLD_LOCAL);
|
||||
}
|
||||
if (!handle) {
|
||||
JNU_ThrowByNameWithMessageAndLastError(env, "java/lang/UnsatisfiedLinkError",
|
||||
JNI_LIB_NAME("xkbcommon"));
|
||||
return false;
|
||||
}
|
||||
|
||||
xkb_ifs.handle = handle;
|
||||
|
||||
BIND_XKB_SYM(xkb_context_new);
|
||||
BIND_XKB_SYM(xkb_keymap_new_from_string);
|
||||
BIND_XKB_SYM(xkb_state_key_get_utf32);
|
||||
BIND_XKB_SYM(xkb_keymap_unref);
|
||||
BIND_XKB_SYM(xkb_state_unref);
|
||||
BIND_XKB_SYM(xkb_state_new);
|
||||
BIND_XKB_SYM(xkb_state_key_get_one_sym);
|
||||
BIND_XKB_SYM(xkb_state_key_get_utf32);
|
||||
BIND_XKB_SYM(xkb_state_update_mask);
|
||||
BIND_XKB_SYM(xkb_state_mod_name_is_active);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
JNIEnv *getEnv() {
|
||||
JNIEnv *env;
|
||||
// assuming we're always called from a Java thread
|
||||
@@ -315,27 +428,34 @@ static const struct wl_pointer_listener wl_pointer_listener = {
|
||||
.axis_discrete = wl_pointer_axis_discrete
|
||||
};
|
||||
|
||||
|
||||
static void
|
||||
wl_keyboard_keymap(void *data, struct wl_keyboard *wl_keyboard, uint32_t format,
|
||||
int32_t fd, uint32_t size)
|
||||
int32_t fd, uint32_t size)
|
||||
{
|
||||
JNIEnv* env = getEnv();
|
||||
if (format != WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1) {
|
||||
JNU_ThrowInternalError(env, "wl_keyboard_keymap supplied unknown keymap format");
|
||||
JNU_ThrowInternalError(getEnv(),
|
||||
"wl_keyboard_keymap supplied unknown keymap format");
|
||||
return;
|
||||
}
|
||||
|
||||
char *serializedKeymap = mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0);
|
||||
if (serializedKeymap == MAP_FAILED) {
|
||||
JNU_ThrowInternalError(env, "wl_keyboard_keymap: failed to memory-map keymap");
|
||||
char *mapped_data = mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0);
|
||||
if (mapped_data == MAP_FAILED) {
|
||||
JNU_ThrowInternalError(getEnv(),
|
||||
"wl_keyboard_keymap: failed to memory-map keymap");
|
||||
return;
|
||||
}
|
||||
|
||||
wlSetKeymap(serializedKeymap);
|
||||
|
||||
munmap(serializedKeymap, size);
|
||||
struct xkb_keymap *new_xkb_keymap = xkb_ifs.xkb_keymap_new_from_string(
|
||||
xkb_context, mapped_data, XKB_KEYMAP_FORMAT_TEXT_V1, 0);
|
||||
munmap(mapped_data, size);
|
||||
close(fd);
|
||||
|
||||
xkb_ifs.xkb_keymap_unref(xkb_keymap);
|
||||
xkb_ifs.xkb_state_unref(xkb_state);
|
||||
|
||||
struct xkb_state *new_xkb_state = xkb_ifs.xkb_state_new(new_xkb_keymap);
|
||||
xkb_state = new_xkb_state;
|
||||
xkb_keymap = new_xkb_keymap;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -351,14 +471,47 @@ wl_keyboard_enter(void *data, struct wl_keyboard *wl_keyboard,
|
||||
dispatchKeyboardEnterEventMID,
|
||||
serial, jlong_to_ptr(surface));
|
||||
JNU_CHECK_EXCEPTION(env);
|
||||
|
||||
uint32_t *key;
|
||||
wl_array_for_each(key, keys) {
|
||||
const uint32_t scancode = *key + 8;
|
||||
const uint32_t keychar32 = xkb_ifs.xkb_state_key_get_utf32(xkb_state, scancode);
|
||||
const xkb_keysym_t keysym = xkb_ifs.xkb_state_key_get_one_sym(xkb_state, scancode);
|
||||
(*env)->CallStaticVoidMethod(env,
|
||||
tkClass,
|
||||
dispatchKeyboardKeyEventMID,
|
||||
serial,
|
||||
0,
|
||||
keysym,
|
||||
keychar32,
|
||||
JNI_TRUE);
|
||||
JNU_CHECK_EXCEPTION(env);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
wl_keyboard_key(void *data, struct wl_keyboard *wl_keyboard,
|
||||
uint32_t serial, uint32_t time, uint32_t keycode, uint32_t state)
|
||||
uint32_t serial, uint32_t time, uint32_t evdev_key, uint32_t state)
|
||||
{
|
||||
last_input_or_focus_serial = serial;
|
||||
|
||||
const uint32_t scancode = evdev_key + 8;
|
||||
const uint32_t keychar32 = xkb_ifs.xkb_state_key_get_utf32(xkb_state, scancode);
|
||||
const xkb_keysym_t keysym = xkb_ifs.xkb_state_key_get_one_sym(xkb_state, scancode);
|
||||
|
||||
JNIEnv* env = getEnv();
|
||||
wlSetKeyState(time, keycode, state ? true : false);
|
||||
const bool pressed
|
||||
= (state == WL_KEYBOARD_KEY_STATE_PRESSED ? JNI_TRUE : JNI_FALSE);
|
||||
(*env)->CallStaticVoidMethod(env,
|
||||
tkClass,
|
||||
dispatchKeyboardKeyEventMID,
|
||||
serial,
|
||||
time,
|
||||
keysym,
|
||||
keychar32,
|
||||
pressed);
|
||||
JNU_CHECK_EXCEPTION(env);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -382,43 +535,69 @@ wl_keyboard_modifiers(void *data, struct wl_keyboard *wl_keyboard,
|
||||
uint32_t mods_latched, uint32_t mods_locked,
|
||||
uint32_t group)
|
||||
{
|
||||
wlSetModifiers(mods_depressed, mods_latched, mods_locked, group);
|
||||
last_input_or_focus_serial = serial;
|
||||
|
||||
xkb_ifs.xkb_state_update_mask(xkb_state,
|
||||
mods_depressed,
|
||||
mods_latched,
|
||||
mods_locked,
|
||||
0,
|
||||
0,
|
||||
group);
|
||||
|
||||
JNIEnv* env = getEnv();
|
||||
|
||||
const bool is_shift_active
|
||||
= xkb_ifs.xkb_state_mod_name_is_active(xkb_state,
|
||||
XKB_MOD_NAME_SHIFT,
|
||||
XKB_STATE_MODS_EFFECTIVE);
|
||||
// This event for ALT gets delivered only after the key has been released already.
|
||||
const bool is_alt_active
|
||||
= xkb_ifs.xkb_state_mod_name_is_active(xkb_state,
|
||||
XKB_MOD_NAME_ALT,
|
||||
XKB_STATE_MODS_EFFECTIVE);
|
||||
const bool is_ctrl_active
|
||||
= xkb_ifs.xkb_state_mod_name_is_active(xkb_state,
|
||||
XKB_MOD_NAME_CTRL,
|
||||
XKB_STATE_MODS_EFFECTIVE);
|
||||
const bool is_meta_active
|
||||
= xkb_ifs.xkb_state_mod_name_is_active(xkb_state,
|
||||
XKB_MOD_NAME_LOGO,
|
||||
XKB_STATE_MODS_EFFECTIVE);
|
||||
|
||||
const bool is_caps_active
|
||||
= xkb_ifs.xkb_state_mod_name_is_active(xkb_state,
|
||||
XKB_MOD_NAME_CAPS,
|
||||
XKB_STATE_MODS_EFFECTIVE);
|
||||
|
||||
const bool is_num_active
|
||||
= xkb_ifs.xkb_state_mod_name_is_active(xkb_state,
|
||||
XKB_MOD_NAME_NUM,
|
||||
XKB_STATE_MODS_EFFECTIVE);
|
||||
|
||||
(*env)->CallStaticVoidMethod(env,
|
||||
tkClass,
|
||||
dispatchKeyboardModifiersEventMID,
|
||||
serial);
|
||||
serial,
|
||||
is_shift_active,
|
||||
is_alt_active,
|
||||
is_ctrl_active,
|
||||
is_meta_active,
|
||||
is_caps_active,
|
||||
is_num_active);
|
||||
JNU_CHECK_EXCEPTION(env);
|
||||
}
|
||||
|
||||
static void
|
||||
wl_keyboard_repeat_info(void *data, struct wl_keyboard *wl_keyboard,
|
||||
int32_t rate, int32_t delay)
|
||||
{
|
||||
if (rate > 0 && delay > 0) {
|
||||
wlSetRepeatInfo(rate, delay);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
wlPostKeyEvent(const struct WLKeyEvent* event)
|
||||
{
|
||||
JNIEnv* env = getEnv();
|
||||
(*env)->CallStaticVoidMethod(
|
||||
env,
|
||||
tkClass,
|
||||
dispatchKeyboardKeyEventMID,
|
||||
event->timestamp,
|
||||
event->id,
|
||||
event->keyCode,
|
||||
event->keyLocation,
|
||||
event->rawCode,
|
||||
event->extendedKeyCode,
|
||||
event->keyChar
|
||||
);
|
||||
JNU_CHECK_EXCEPTION(env);
|
||||
if (rate > 0 && delay > 0) {
|
||||
(*env)->SetStaticIntField(env, tkClass, keyRepeatRateFID, rate);
|
||||
(*env)->SetStaticIntField(env, tkClass, keyRepeatDelayFID, delay);
|
||||
}
|
||||
J2dTrace2(J2D_TRACE_INFO, "WLToolkit: set keyboard repeat rate %d and delay %d\n", rate, delay);
|
||||
}
|
||||
|
||||
static const struct wl_keyboard_listener wl_keyboard_listener = {
|
||||
@@ -644,11 +823,18 @@ initJavaRefs(JNIEnv *env, jclass clazz)
|
||||
JNI_FALSE);
|
||||
CHECK_NULL_RETURN(dispatchKeyboardKeyEventMID = (*env)->GetStaticMethodID(env, tkClass,
|
||||
"dispatchKeyboardKeyEvent",
|
||||
"(JIIIIIC)V"),
|
||||
"(JJJIZ)V"),
|
||||
JNI_FALSE);
|
||||
CHECK_NULL_RETURN(dispatchKeyboardModifiersEventMID = (*env)->GetStaticMethodID(env, tkClass,
|
||||
"dispatchKeyboardModifiersEvent",
|
||||
"(J)V"),
|
||||
"(JZZZZZZ)V"),
|
||||
JNI_FALSE);
|
||||
|
||||
CHECK_NULL_RETURN(keyRepeatRateFID = (*env)->GetStaticFieldID(env, tkClass,
|
||||
"keyRepeatRate", "I"),
|
||||
JNI_FALSE);
|
||||
CHECK_NULL_RETURN(keyRepeatDelayFID = (*env)->GetStaticFieldID(env, tkClass,
|
||||
"keyRepeatDelay", "I"),
|
||||
JNI_FALSE);
|
||||
|
||||
jclass wlgeClass = (*env)->FindClass(env, "sun/awt/wl/WLGraphicsEnvironment");
|
||||
@@ -657,6 +843,17 @@ initJavaRefs(JNIEnv *env, jclass clazz)
|
||||
return WLGraphicsEnvironment_initIDs(env, wlgeClass);
|
||||
}
|
||||
|
||||
static bool
|
||||
initXKB(JNIEnv* env)
|
||||
{
|
||||
if (!xkbcommon_load(env)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
xkb_context = xkb_ifs.xkb_context_new(0);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Reading cursor theme/size using 'gsettings' command line tool proved to be faster than initializing GTK and reading
|
||||
// those values using corresponding GLib API (like e.g. com.sun.java.swing.plaf.gtk.GTKEngine.getSetting does). If GTK
|
||||
// will be required by WLToolkit anyway due to some reason, this code would probably need to be removed.
|
||||
@@ -672,12 +869,8 @@ readDesktopProperty(const char* name, char *output, int outputSize) {
|
||||
return pclose(fd) ? NULL : res;
|
||||
}
|
||||
|
||||
struct wl_cursor_theme*
|
||||
getCursorTheme(int scale) {
|
||||
if (cursor_themes[scale]) {
|
||||
return cursor_themes[scale];
|
||||
}
|
||||
|
||||
static void
|
||||
initCursors() {
|
||||
char *theme_name;
|
||||
int theme_size = 0;
|
||||
char buffer[256];
|
||||
@@ -705,17 +898,10 @@ getCursorTheme(int scale) {
|
||||
}
|
||||
}
|
||||
|
||||
if (scale >= MAX_CURSOR_SCALE) {
|
||||
J2dTrace(J2D_TRACE_ERROR, "WLToolkit: Reach the maximum scale for cursor theme\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
cursor_themes[scale] = wl_cursor_theme_load(theme_name, theme_size * scale, wl_shm);
|
||||
if (!cursor_themes[scale]) {
|
||||
wl_cursor_theme = wl_cursor_theme_load(theme_name, theme_size, wl_shm);
|
||||
if (!wl_cursor_theme) {
|
||||
J2dTrace(J2D_TRACE_ERROR, "WLToolkit: Failed to load cursor theme\n");
|
||||
}
|
||||
|
||||
return cursor_themes[scale];
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -750,6 +936,10 @@ Java_sun_awt_wl_WLToolkit_initIDs
|
||||
return;
|
||||
}
|
||||
|
||||
if (!initXKB(env)) {
|
||||
return; // an exception has been thrown already
|
||||
}
|
||||
|
||||
struct wl_registry *wl_registry = wl_display_get_registry(wl_display);
|
||||
if (wl_registry == NULL) {
|
||||
JNU_ThrowByName(env, "java/awt/AWTError", "Failed to obtain Wayland registry");
|
||||
@@ -766,6 +956,8 @@ Java_sun_awt_wl_WLToolkit_initIDs
|
||||
|
||||
J2dTrace1(J2D_TRACE_INFO, "WLToolkit: Connection to display(%p) established\n", wl_display);
|
||||
|
||||
initCursors();
|
||||
|
||||
finalizeInit(env);
|
||||
}
|
||||
|
||||
@@ -803,9 +995,6 @@ wlFlushToServer(JNIEnv *env)
|
||||
|
||||
while (true) {
|
||||
errno = 0;
|
||||
// From Wayland code: "if all data could not be written, errno will be set
|
||||
// to EAGAIN and -1 returned. In that case, use poll on the display
|
||||
// file descriptor to wait for it to become writable again."
|
||||
rc = wl_display_flush(wl_display);
|
||||
if (rc != -1 || errno != EAGAIN) {
|
||||
break;
|
||||
@@ -1089,6 +1278,59 @@ void awt_output_flush()
|
||||
wlFlushToServer(getEnv());
|
||||
}
|
||||
|
||||
static void
|
||||
RandomName(char *buf) {
|
||||
struct timespec ts;
|
||||
clock_gettime(CLOCK_REALTIME, &ts);
|
||||
long r = ts.tv_nsec;
|
||||
while (*buf) {
|
||||
*buf++ = 'A' + (r & 15) + (r & 16) * 2;
|
||||
r >>= 5;
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
CreateSharedMemoryFile(const char* baseName) {
|
||||
// constructing the full name of the form /baseName-XXXXXX
|
||||
int baseLen = strlen(baseName);
|
||||
char *name = (char*) malloc(baseLen + 9);
|
||||
if (!name)
|
||||
return -1;
|
||||
name[0] = '/';
|
||||
strcpy(name + 1, baseName);
|
||||
strcpy(name + baseLen + 1, "-XXXXXX");
|
||||
|
||||
int retries = 100;
|
||||
do {
|
||||
RandomName(name + baseLen + 2);
|
||||
--retries;
|
||||
int fd = shm_open(name, O_RDWR | O_CREAT | O_EXCL, 0600);
|
||||
if (fd >= 0) {
|
||||
shm_unlink(name);
|
||||
free(name);
|
||||
return fd;
|
||||
}
|
||||
} while (retries > 0 && errno == EEXIST);
|
||||
free(name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int
|
||||
AllocateSharedMemoryFile(size_t size, const char* baseName) {
|
||||
int fd = CreateSharedMemoryFile(baseName);
|
||||
if (fd < 0)
|
||||
return -1;
|
||||
int ret;
|
||||
do {
|
||||
ret = ftruncate(fd, size);
|
||||
} while (ret < 0 && errno == EINTR);
|
||||
if (ret < 0) {
|
||||
close(fd);
|
||||
return -1;
|
||||
}
|
||||
return fd;
|
||||
}
|
||||
|
||||
struct wl_shm_pool *CreateShmPool(size_t size, const char *name, void **data) {
|
||||
if (size <= 0)
|
||||
return NULL;
|
||||
|
||||
@@ -28,8 +28,6 @@
|
||||
#include "xdg-shell-client-protocol.h"
|
||||
#include "xdg-activation-v1-client-protocol.h"
|
||||
#include "primary-selection-client-protocol.h"
|
||||
#include "jvm_md.h"
|
||||
#include "jni_util.h"
|
||||
|
||||
#define CHECK_NULL_THROW_OOME_RETURN(env, x, msg, z)\
|
||||
do { \
|
||||
@@ -70,6 +68,5 @@ extern uint32_t last_input_or_focus_serial;
|
||||
JNIEnv *getEnv();
|
||||
|
||||
int wlFlushToServer(JNIEnv* env);
|
||||
struct wl_cursor_theme *getCursorTheme(int scale);
|
||||
|
||||
struct wl_shm_pool *CreateShmPool(size_t size, const char *name, void **data);
|
||||
|
||||
@@ -46,7 +46,6 @@ static const struct wl_interface *wakefield_types[] = {
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
&wl_surface_interface,
|
||||
NULL,
|
||||
NULL,
|
||||
@@ -64,26 +63,25 @@ static const struct wl_interface *wakefield_types[] = {
|
||||
|
||||
static const struct wl_message wakefield_requests[] = {
|
||||
{ "destroy", "", wakefield_types + 0 },
|
||||
{ "move_surface", "oii", wakefield_types + 5 },
|
||||
{ "get_surface_location", "o", wakefield_types + 8 },
|
||||
{ "move_surface", "oii", wakefield_types + 4 },
|
||||
{ "get_surface_location", "o", wakefield_types + 7 },
|
||||
{ "get_pixel_color", "ii", wakefield_types + 0 },
|
||||
{ "send_key", "uu", wakefield_types + 0 },
|
||||
{ "send_cursor", "ii", wakefield_types + 0 },
|
||||
{ "send_button", "uu", wakefield_types + 0 },
|
||||
{ "send_wheel", "i", wakefield_types + 0 },
|
||||
{ "set_xkb_rule_names", "sssss", wakefield_types + 0 },
|
||||
{ "capture_create", "oii", wakefield_types + 9 },
|
||||
{ "capture_create", "oii", wakefield_types + 8 },
|
||||
};
|
||||
|
||||
static const struct wl_message wakefield_events[] = {
|
||||
{ "surface_location", "oiiu", wakefield_types + 12 },
|
||||
{ "surface_location", "oiiu", wakefield_types + 11 },
|
||||
{ "pixel_color", "iiuu", wakefield_types + 0 },
|
||||
{ "capture_ready", "ou", wakefield_types + 16 },
|
||||
{ "capture_ready", "ou", wakefield_types + 15 },
|
||||
};
|
||||
|
||||
WL_PRIVATE const struct wl_interface wakefield_interface = {
|
||||
"wakefield", 1,
|
||||
10, wakefield_requests,
|
||||
9, wakefield_requests,
|
||||
3, wakefield_events,
|
||||
};
|
||||
|
||||
|
||||
@@ -146,8 +146,7 @@ wakefield_add_listener(struct wakefield *wakefield,
|
||||
#define WAKEFIELD_SEND_CURSOR 5
|
||||
#define WAKEFIELD_SEND_BUTTON 6
|
||||
#define WAKEFIELD_SEND_WHEEL 7
|
||||
#define WAKEFIELD_SET_XKB_RULE_NAMES 8
|
||||
#define WAKEFIELD_CAPTURE_CREATE 9
|
||||
#define WAKEFIELD_CAPTURE_CREATE 8
|
||||
|
||||
/**
|
||||
* @ingroup iface_wakefield
|
||||
@@ -194,10 +193,6 @@ wakefield_add_listener(struct wakefield *wakefield,
|
||||
* @ingroup iface_wakefield
|
||||
*/
|
||||
#define WAKEFIELD_SEND_WHEEL_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_wakefield
|
||||
*/
|
||||
#define WAKEFIELD_SET_XKB_RULE_NAMES_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_wakefield
|
||||
*/
|
||||
@@ -322,19 +317,6 @@ wakefield_send_wheel(struct wakefield *wakefield, int32_t amount)
|
||||
WAKEFIELD_SEND_WHEEL, amount);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_wakefield
|
||||
*
|
||||
* This requests the compositor to load the specified XKB layout and use it in all
|
||||
* further keyboard handling.
|
||||
*/
|
||||
static inline void
|
||||
wakefield_set_xkb_rule_names(struct wakefield *wakefield, const char *rules, const char *model, const char *layout, const char *variant, const char *options)
|
||||
{
|
||||
wl_proxy_marshal((struct wl_proxy *) wakefield,
|
||||
WAKEFIELD_SET_XKB_RULE_NAMES, rules, model, layout, variant, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_wakefield
|
||||
*/
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -30,7 +30,20 @@
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/extensions/shape.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <pthread.h>
|
||||
#include <signal.h>
|
||||
#include <inttypes.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include "systemScale.h"
|
||||
|
||||
typedef uint32_t rgbquad_t;
|
||||
typedef uint16_t word_t;
|
||||
typedef uint8_t byte_t;
|
||||
typedef XRectangle RECT_T;
|
||||
|
||||
#define RECT_EQ_X(r1,r2) ((r1).x==(r2).x && (r1).width==(r2).width)
|
||||
@@ -38,4 +51,10 @@ typedef XRectangle RECT_T;
|
||||
(r).height=(hh);
|
||||
#define RECT_INC_HEIGHT(r) (r).height++;
|
||||
|
||||
#define SPLASHCTL_QUIT 'Q'
|
||||
#define SPLASHCTL_UPDATE 'U'
|
||||
#define SPLASHCTL_RECONFIGURE 'R'
|
||||
|
||||
#define INLINE static
|
||||
|
||||
#endif
|
||||
@@ -1,43 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2023, JetBrains s.r.o.. All rights reserved.
|
||||
*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
#ifndef SPLASHSCREEN_CONFIG_COMMON_H
|
||||
#define SPLASHSCREEN_CONFIG_COMMON_H
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
typedef uint32_t rgbquad_t;
|
||||
typedef uint16_t word_t;
|
||||
typedef uint8_t byte_t;
|
||||
|
||||
#define SPLASHCTL_QUIT 'Q'
|
||||
#define SPLASHCTL_UPDATE 'U'
|
||||
#define SPLASHCTL_RECONFIGURE 'R'
|
||||
|
||||
#define INLINE static
|
||||
|
||||
#endif
|
||||
@@ -24,25 +24,85 @@
|
||||
*/
|
||||
|
||||
#include "splashscreen_impl.h"
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/extensions/shape.h>
|
||||
#include <X11/Xmd.h>
|
||||
#include <X11/Xatom.h>
|
||||
#include <X11/cursorfont.h>
|
||||
#include <sys/types.h>
|
||||
#include <pthread.h>
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/time.h>
|
||||
#include <errno.h>
|
||||
#include <iconv.h>
|
||||
#include <langinfo.h>
|
||||
#include <locale.h>
|
||||
#include <fcntl.h>
|
||||
#include <poll.h>
|
||||
#include <sizecalc.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include "jni.h"
|
||||
|
||||
static Bool shapeSupported;
|
||||
static int shapeEventBase, shapeErrorBase;
|
||||
|
||||
void SplashRemoveDecoration(Splash * splash);
|
||||
|
||||
|
||||
/* Could use npt but decided to cut down on linked code size */
|
||||
char* SplashConvertStringAlloc(const char* in, int* size) {
|
||||
const char *codeset;
|
||||
const char *codeset_out;
|
||||
iconv_t cd;
|
||||
size_t rc;
|
||||
char *buf = NULL, *out;
|
||||
size_t bufSize, inSize, outSize;
|
||||
const char* old_locale;
|
||||
|
||||
if (!in) {
|
||||
return NULL;
|
||||
}
|
||||
old_locale = setlocale(LC_ALL, "");
|
||||
|
||||
codeset = nl_langinfo(CODESET);
|
||||
if ( codeset == NULL || codeset[0] == 0 ) {
|
||||
goto done;
|
||||
}
|
||||
/* we don't need BOM in output so we choose native BE or LE encoding here */
|
||||
codeset_out = (platformByteOrder()==BYTE_ORDER_MSBFIRST) ?
|
||||
"UCS-2BE" : "UCS-2LE";
|
||||
|
||||
cd = iconv_open(codeset_out, codeset);
|
||||
if (cd == (iconv_t)-1 ) {
|
||||
goto done;
|
||||
}
|
||||
inSize = strlen(in);
|
||||
buf = SAFE_SIZE_ARRAY_ALLOC(malloc, inSize, 2);
|
||||
if (!buf) {
|
||||
return NULL;
|
||||
}
|
||||
bufSize = inSize*2; // need 2 bytes per char for UCS-2, this is
|
||||
// 2 bytes per source byte max
|
||||
out = buf; outSize = bufSize;
|
||||
/* linux iconv wants char** source and solaris wants const char**...
|
||||
cast to void* */
|
||||
rc = iconv(cd, (void*)&in, &inSize, &out, &outSize);
|
||||
iconv_close(cd);
|
||||
|
||||
if (rc == (size_t)-1) {
|
||||
free(buf);
|
||||
buf = NULL;
|
||||
} else {
|
||||
if (size) {
|
||||
*size = (bufSize-outSize)/2; /* bytes to wchars */
|
||||
}
|
||||
}
|
||||
done:
|
||||
setlocale(LC_ALL, old_locale);
|
||||
return buf;
|
||||
}
|
||||
|
||||
void
|
||||
SplashInitFrameShape(Splash * splash, int imageIndex) {
|
||||
ImageRect maskRect;
|
||||
@@ -76,6 +136,25 @@ SplashInitFrameShape(Splash * splash, int imageIndex) {
|
||||
free(rects);
|
||||
}
|
||||
|
||||
unsigned
|
||||
SplashTime(void) {
|
||||
struct timeval tv;
|
||||
struct timezone tz;
|
||||
unsigned long long msec;
|
||||
|
||||
gettimeofday(&tv, &tz);
|
||||
msec = (unsigned long long) tv.tv_sec * 1000 +
|
||||
(unsigned long long) tv.tv_usec / 1000;
|
||||
|
||||
return (unsigned) msec;
|
||||
}
|
||||
|
||||
void
|
||||
msec2timeval(unsigned time, struct timeval *tv) {
|
||||
tv->tv_sec = time / 1000;
|
||||
tv->tv_usec = (time % 1000) * 1000;
|
||||
}
|
||||
|
||||
int
|
||||
GetNumAvailableColors(Display * display, Screen * screen, unsigned map_entries) {
|
||||
unsigned long pmr[1];
|
||||
@@ -129,8 +208,7 @@ FreeColors(Display * display, Screen * screen, int numColors,
|
||||
XFreeColors(display, cmap, pr, numColors, 0);
|
||||
}
|
||||
|
||||
static void
|
||||
SplashCenter(Splash * splash) {
|
||||
static void SplashCenter(Splash * splash) {
|
||||
Atom type, atom, actual_type;
|
||||
int status, actual_format;
|
||||
unsigned long nitems, bytes_after;
|
||||
@@ -158,8 +236,7 @@ SplashCenter(Splash * splash) {
|
||||
splash->y = (XHeightOfScreen(splash->screen) - splash->height) / 2;
|
||||
}
|
||||
|
||||
static void
|
||||
SplashUpdateSizeHints(Splash * splash) {
|
||||
static void SplashUpdateSizeHints(Splash * splash) {
|
||||
if (splash->window) {
|
||||
XSizeHints sizeHints;
|
||||
|
||||
@@ -172,7 +249,7 @@ SplashUpdateSizeHints(Splash * splash) {
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
SplashCreateWindow(Splash * splash) {
|
||||
XSizeHints sizeHints;
|
||||
|
||||
@@ -200,8 +277,6 @@ SplashCreateWindow(Splash * splash) {
|
||||
splash->wmHints->initial_state = NormalState;
|
||||
XSetWMHints(splash->display, splash->window, splash->wmHints);
|
||||
}
|
||||
|
||||
return (bool) splash->window;
|
||||
}
|
||||
|
||||
/* for changing the visible shape of a window to an nonrectangular form */
|
||||
@@ -258,7 +333,7 @@ SplashRedrawWindow(Splash * splash) {
|
||||
// much sense as SplashUpdateScreenData always re-generates
|
||||
// the image completely, so whole window is always redrawn
|
||||
|
||||
SplashUpdateScreenData(splash, false);
|
||||
SplashUpdateScreenData(splash);
|
||||
ximage = XCreateImage(splash->display, splash->visual,
|
||||
splash->screenFormat.depthBytes * 8, ZPixmap, 0, (char *) NULL,
|
||||
splash->width, splash->height, 8, 0);
|
||||
@@ -277,8 +352,7 @@ SplashRedrawWindow(Splash * splash) {
|
||||
XFlush(splash->display);
|
||||
}
|
||||
|
||||
void
|
||||
SplashReconfigureNow(Splash * splash) {
|
||||
void SplashReconfigureNow(Splash * splash) {
|
||||
SplashCenter(splash);
|
||||
if (splash->window) {
|
||||
XUnmapWindow(splash->display, splash->window);
|
||||
@@ -295,6 +369,15 @@ SplashReconfigureNow(Splash * splash) {
|
||||
SplashRedrawWindow(splash);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
sendctl(Splash * splash, char code) {
|
||||
// if (splash->isVisible>0) {
|
||||
if (splash && splash->controlpipe[1]) {
|
||||
write(splash->controlpipe[1], &code, 1);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
HandleError(Display * disp, XErrorEvent * err) {
|
||||
// silently ignore non-fatal errors
|
||||
@@ -465,38 +548,93 @@ SplashDonePlatform(Splash * splash) {
|
||||
XCloseDisplay(splash->display);
|
||||
}
|
||||
|
||||
bool
|
||||
FlushEvents(Splash * splash) {
|
||||
return true;
|
||||
}
|
||||
void
|
||||
SplashEventLoop(Splash * splash) {
|
||||
|
||||
bool
|
||||
DispatchEvents(Splash * splash) {
|
||||
// we're not using "while(XPending)", processing one event
|
||||
// at a time to avoid control pipe starvation
|
||||
if (XPending(splash->display)) {
|
||||
XEvent evt;
|
||||
/* Different from win32 implementation - this loop
|
||||
uses poll timeouts instead of a timer */
|
||||
/* we should have splash _locked_ on entry!!! */
|
||||
|
||||
XNextEvent(splash->display, &evt);
|
||||
switch (evt.type) {
|
||||
case Expose:
|
||||
if (splash->isVisible>0) {
|
||||
// we're doing full redraw so we just
|
||||
// skip the remaining painting events in the queue
|
||||
while(XCheckTypedEvent(splash->display, Expose,
|
||||
&evt));
|
||||
SplashRedrawWindow(splash);
|
||||
int xconn = XConnectionNumber(splash->display);
|
||||
|
||||
while (1) {
|
||||
struct pollfd pfd[2];
|
||||
int timeout = -1;
|
||||
int ctl = splash->controlpipe[0];
|
||||
int rc;
|
||||
int pipes_empty;
|
||||
|
||||
pfd[0].fd = xconn;
|
||||
pfd[0].events = POLLIN | POLLPRI;
|
||||
|
||||
pfd[1].fd = ctl;
|
||||
pfd[1].events = POLLIN | POLLPRI;
|
||||
|
||||
errno = 0;
|
||||
if (splash->isVisible>0 && SplashIsStillLooping(splash)) {
|
||||
timeout = splash->time + splash->frames[splash->currentFrame].delay
|
||||
- SplashTime();
|
||||
if (timeout < 0) {
|
||||
timeout = 0;
|
||||
}
|
||||
}
|
||||
SplashUnlock(splash);
|
||||
rc = poll(pfd, 2, timeout);
|
||||
SplashLock(splash);
|
||||
if (splash->isVisible > 0 && splash->currentFrame >= 0 &&
|
||||
SplashTime() >= splash->time + splash->frames[splash->currentFrame].delay) {
|
||||
SplashNextFrame(splash);
|
||||
SplashUpdateShape(splash);
|
||||
SplashRedrawWindow(splash);
|
||||
}
|
||||
if (rc <= 0) {
|
||||
errno = 0;
|
||||
continue;
|
||||
}
|
||||
pipes_empty = 0;
|
||||
while(!pipes_empty) {
|
||||
char buf;
|
||||
|
||||
pipes_empty = 1;
|
||||
if (read(ctl, &buf, sizeof(buf)) > 0) {
|
||||
pipes_empty = 0;
|
||||
switch (buf) {
|
||||
case SPLASHCTL_UPDATE:
|
||||
if (splash->isVisible>0) {
|
||||
SplashRedrawWindow(splash);
|
||||
}
|
||||
break;
|
||||
case SPLASHCTL_RECONFIGURE:
|
||||
if (splash->isVisible>0) {
|
||||
SplashReconfigureNow(splash);
|
||||
}
|
||||
break;
|
||||
case SPLASHCTL_QUIT:
|
||||
return;
|
||||
}
|
||||
break;
|
||||
/* ... */
|
||||
}
|
||||
// we're not using "while(XPending)", processing one event
|
||||
// at a time to avoid control pipe starvation
|
||||
if (XPending(splash->display)) {
|
||||
XEvent evt;
|
||||
|
||||
pipes_empty = 0;
|
||||
XNextEvent(splash->display, &evt);
|
||||
switch (evt.type) {
|
||||
case Expose:
|
||||
if (splash->isVisible>0) {
|
||||
// we're doing full redraw so we just
|
||||
// skip the remaining painting events in the queue
|
||||
while(XCheckTypedEvent(splash->display, Expose,
|
||||
&evt));
|
||||
SplashRedrawWindow(splash);
|
||||
}
|
||||
break;
|
||||
/* ... */
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
int
|
||||
GetDisplayFD(Splash * splash) {
|
||||
return XConnectionNumber(splash->display);
|
||||
}
|
||||
|
||||
/* we can't use OverrideRedirect for the window as the window should not be
|
||||
@@ -587,13 +725,93 @@ SplashRemoveDecoration(Splash * splash) {
|
||||
}
|
||||
|
||||
void
|
||||
SplashSetup(Splash * splash) {
|
||||
SplashRemoveDecoration(splash);
|
||||
XStoreName(splash->display, splash->window, "Java");
|
||||
XMapRaised(splash->display, splash->window);
|
||||
SplashUpdateShape(splash);
|
||||
SplashPThreadDestructor(void *arg) {
|
||||
/* this will be used in case of emergency thread exit on xlib error */
|
||||
Splash *splash = (Splash *) arg;
|
||||
|
||||
if (splash) {
|
||||
SplashCleanup(splash);
|
||||
}
|
||||
}
|
||||
|
||||
void *
|
||||
SplashScreenThread(void *param) {
|
||||
Splash *splash = (Splash *) param;
|
||||
// pthread_key_t key;
|
||||
|
||||
// pthread_key_create(&key, SplashPThreadDestructor);
|
||||
// pthread_setspecific(key, splash);
|
||||
|
||||
SplashLock(splash);
|
||||
pipe(splash->controlpipe);
|
||||
fcntl(splash->controlpipe[0], F_SETFL,
|
||||
fcntl(splash->controlpipe[0], F_GETFL, 0) | O_NONBLOCK);
|
||||
splash->time = SplashTime();
|
||||
SplashCreateWindow(splash);
|
||||
fflush(stdout);
|
||||
if (splash->window) {
|
||||
SplashRemoveDecoration(splash);
|
||||
XStoreName(splash->display, splash->window, "Java");
|
||||
XMapRaised(splash->display, splash->window);
|
||||
SplashUpdateShape(splash);
|
||||
SplashRedrawWindow(splash);
|
||||
//map the splash coordinates as per system scale
|
||||
splash->x /= splash->scaleFactor;
|
||||
splash->y /= splash->scaleFactor;
|
||||
SplashEventLoop(splash);
|
||||
}
|
||||
SplashUnlock(splash);
|
||||
SplashDone(splash);
|
||||
|
||||
splash->isVisible=-1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
SplashUpdateCursor(Splash * splash) {
|
||||
}
|
||||
SplashCreateThread(Splash * splash) {
|
||||
pthread_t thr;
|
||||
pthread_attr_t attr;
|
||||
int rc;
|
||||
|
||||
pthread_attr_init(&attr);
|
||||
rc = pthread_create(&thr, &attr, SplashScreenThread, (void *) splash);
|
||||
}
|
||||
|
||||
void
|
||||
SplashLock(Splash * splash) {
|
||||
pthread_mutex_lock(&splash->lock);
|
||||
}
|
||||
|
||||
void
|
||||
SplashUnlock(Splash * splash) {
|
||||
pthread_mutex_unlock(&splash->lock);
|
||||
}
|
||||
|
||||
void
|
||||
SplashClosePlatform(Splash * splash) {
|
||||
sendctl(splash, SPLASHCTL_QUIT);
|
||||
}
|
||||
|
||||
void
|
||||
SplashUpdate(Splash * splash) {
|
||||
sendctl(splash, SPLASHCTL_UPDATE);
|
||||
}
|
||||
|
||||
void
|
||||
SplashReconfigure(Splash * splash) {
|
||||
sendctl(splash, SPLASHCTL_RECONFIGURE);
|
||||
}
|
||||
|
||||
JNIEXPORT jboolean
|
||||
SplashGetScaledImageName(const char* jarName, const char* fileName,
|
||||
float *scaleFactor, char *scaledImgName,
|
||||
const size_t scaledImageNameLength)
|
||||
{
|
||||
*scaleFactor = 1;
|
||||
#ifndef __linux__
|
||||
return JNI_FALSE;
|
||||
#endif
|
||||
*scaleFactor = (float)getNativeScaleFactor(NULL, 1);
|
||||
return GetScaledImageName(fileName, scaledImgName, scaleFactor, scaledImageNameLength);
|
||||
}
|
||||
|
||||
@@ -1,272 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2023, JetBrains s.r.o.. All rights reserved.
|
||||
*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
#include "splashscreen_impl.h"
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <iconv.h>
|
||||
#include <langinfo.h>
|
||||
#include <locale.h>
|
||||
#include <fcntl.h>
|
||||
#include <poll.h>
|
||||
#include <sizecalc.h>
|
||||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
|
||||
const int POLL_EVENT_TIMEOUT = 50;
|
||||
|
||||
void SplashEventLoop(Splash * splash);
|
||||
bool SplashCreateWindow(Splash * splash);
|
||||
void SplashRedrawWindow(Splash * splash);
|
||||
void SplashUpdateCursor(Splash * splash);
|
||||
void SplashSetup(Splash * splash);
|
||||
void SplashUpdateShape(Splash * splash);
|
||||
bool SplashReconfigureNow(Splash * splash);
|
||||
|
||||
bool FlushEvents(Splash * splash);
|
||||
bool DispatchEvents(Splash * splash);
|
||||
int GetDisplayFD(Splash * splash);
|
||||
|
||||
/* Could use npt but decided to cut down on linked code size */
|
||||
char*
|
||||
SplashConvertStringAlloc(const char* in, int* size) {
|
||||
const char *codeset;
|
||||
const char *codeset_out;
|
||||
iconv_t cd;
|
||||
size_t rc;
|
||||
char *buf = NULL, *out;
|
||||
size_t bufSize, inSize, outSize;
|
||||
const char* old_locale;
|
||||
|
||||
if (!in) {
|
||||
return NULL;
|
||||
}
|
||||
old_locale = setlocale(LC_ALL, "");
|
||||
|
||||
codeset = nl_langinfo(CODESET);
|
||||
if ( codeset == NULL || codeset[0] == 0 ) {
|
||||
goto done;
|
||||
}
|
||||
/* we don't need BOM in output so we choose native BE or LE encoding here */
|
||||
codeset_out = (platformByteOrder()==BYTE_ORDER_MSBFIRST) ?
|
||||
"UCS-2BE" : "UCS-2LE";
|
||||
|
||||
cd = iconv_open(codeset_out, codeset);
|
||||
if (cd == (iconv_t)-1 ) {
|
||||
goto done;
|
||||
}
|
||||
inSize = strlen(in);
|
||||
buf = SAFE_SIZE_ARRAY_ALLOC(malloc, inSize, 2);
|
||||
if (!buf) {
|
||||
return NULL;
|
||||
}
|
||||
bufSize = inSize*2; // need 2 bytes per char for UCS-2, this is
|
||||
// 2 bytes per source byte max
|
||||
out = buf; outSize = bufSize;
|
||||
/* linux iconv wants char** source and solaris wants const char**...
|
||||
cast to void* */
|
||||
rc = iconv(cd, (void*)&in, &inSize, &out, &outSize);
|
||||
iconv_close(cd);
|
||||
|
||||
if (rc == (size_t)-1) {
|
||||
free(buf);
|
||||
buf = NULL;
|
||||
} else {
|
||||
if (size) {
|
||||
*size = (bufSize-outSize)/2; /* bytes to wchars */
|
||||
}
|
||||
}
|
||||
done:
|
||||
setlocale(LC_ALL, old_locale);
|
||||
return buf;
|
||||
}
|
||||
|
||||
void
|
||||
SplashEventLoop(Splash * splash) {
|
||||
struct pollfd pfd[2];
|
||||
int rc;
|
||||
unsigned lastCursorUpdate;
|
||||
|
||||
pfd[0].fd = splash->controlpipe[0];
|
||||
pfd[0].events = POLLIN | POLLPRI;
|
||||
pfd[0].revents = 0;
|
||||
|
||||
pfd[1].fd = GetDisplayFD(splash);
|
||||
pfd[1].events = POLLIN | POLLPRI;
|
||||
pfd[1].revents = 0;
|
||||
|
||||
lastCursorUpdate = SplashTime();
|
||||
|
||||
while (true) {
|
||||
if (!FlushEvents(splash)) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (splash->isVisible > 0 && splash->currentFrame >= 0 && SplashIsStillLooping(splash) &&
|
||||
SplashTime() >= splash->time + splash->frames[splash->currentFrame].delay) {
|
||||
SplashNextFrame(splash);
|
||||
SplashUpdateShape(splash);
|
||||
SplashRedrawWindow(splash);
|
||||
}
|
||||
|
||||
SplashUnlock(splash);
|
||||
rc = poll(pfd, 2, POLL_EVENT_TIMEOUT);
|
||||
SplashLock(splash);
|
||||
|
||||
if (SplashTime() - lastCursorUpdate > 100) {
|
||||
SplashUpdateCursor(splash);
|
||||
lastCursorUpdate = SplashTime();
|
||||
}
|
||||
|
||||
if (rc <= 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (pfd[1].revents) {
|
||||
if (!DispatchEvents(splash)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (pfd[0].revents) {
|
||||
char buf;
|
||||
if (read(splash->controlpipe[0], &buf, sizeof(buf)) > 0) {
|
||||
switch (buf) {
|
||||
case SPLASHCTL_UPDATE:
|
||||
if (splash->isVisible > 0) {
|
||||
SplashRedrawWindow(splash);
|
||||
}
|
||||
break;
|
||||
case SPLASHCTL_RECONFIGURE:
|
||||
if (splash->isVisible > 0) {
|
||||
if (!SplashReconfigureNow(splash)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SPLASHCTL_QUIT:
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsigned
|
||||
SplashTime(void) {
|
||||
struct timeval tv;
|
||||
struct timezone tz;
|
||||
unsigned long long msec;
|
||||
|
||||
gettimeofday(&tv, &tz);
|
||||
msec = (unsigned long long) tv.tv_sec * 1000 + (unsigned long long) tv.tv_usec / 1000;
|
||||
|
||||
return (unsigned) msec;
|
||||
}
|
||||
|
||||
void
|
||||
SplashPThreadDestructor(void *data) {
|
||||
Splash *splash = data;
|
||||
|
||||
if (splash) {
|
||||
SplashCleanup(splash);
|
||||
}
|
||||
}
|
||||
|
||||
void *
|
||||
SplashScreenThread(void *data) {
|
||||
Splash *splash = data;
|
||||
|
||||
SplashLock(splash);
|
||||
pipe(splash->controlpipe);
|
||||
fcntl(splash->controlpipe[0], F_SETFL, fcntl(splash->controlpipe[0], F_GETFL, 0) | O_NONBLOCK);
|
||||
splash->time = SplashTime();
|
||||
bool init = SplashCreateWindow(splash);
|
||||
fflush(stdout);
|
||||
if (init) {
|
||||
SplashSetup(splash);
|
||||
SplashRedrawWindow(splash);
|
||||
SplashEventLoop(splash);
|
||||
}
|
||||
SplashUnlock(splash);
|
||||
SplashDone(splash);
|
||||
|
||||
splash->isVisible=-1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
SplashCreateThread(Splash * splash) {
|
||||
pthread_t thr;
|
||||
pthread_attr_t attr;
|
||||
pthread_attr_init(&attr);
|
||||
pthread_create(&thr, &attr, SplashScreenThread, (void *) splash);
|
||||
}
|
||||
|
||||
void
|
||||
sendctl(Splash * splash, char code) {
|
||||
if (splash && splash->controlpipe[1]) {
|
||||
write(splash->controlpipe[1], &code, 1);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SplashLock(Splash * splash) {
|
||||
pthread_mutex_lock(&splash->lock);
|
||||
}
|
||||
|
||||
void
|
||||
SplashUnlock(Splash * splash) {
|
||||
pthread_mutex_unlock(&splash->lock);
|
||||
}
|
||||
|
||||
void
|
||||
SplashClosePlatform(Splash * splash) {
|
||||
sendctl(splash, SPLASHCTL_QUIT);
|
||||
}
|
||||
|
||||
void
|
||||
SplashUpdate(Splash * splash) {
|
||||
sendctl(splash, SPLASHCTL_UPDATE);
|
||||
}
|
||||
|
||||
void
|
||||
SplashReconfigure(Splash * splash) {
|
||||
sendctl(splash, SPLASHCTL_RECONFIGURE);
|
||||
}
|
||||
|
||||
JNIEXPORT jboolean
|
||||
SplashGetScaledImageName(const char* jarName, const char* fileName,
|
||||
float *scaleFactor, char *scaledImgName,
|
||||
const size_t scaledImageNameLength) {
|
||||
*scaleFactor = 1;
|
||||
#ifndef __linux__
|
||||
return JNI_FALSE;
|
||||
#endif
|
||||
*scaleFactor = (float) getNativeScaleFactor(NULL, 1);
|
||||
return GetScaledImageName(fileName, scaledImgName, scaleFactor, scaledImageNameLength);
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2023, JetBrains s.r.o.. All rights reserved.
|
||||
*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
#ifndef SPLASHSCREEN_CONFIG_H
|
||||
#define SPLASHSCREEN_CONFIG_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef struct Buffer {
|
||||
void *data;
|
||||
int size;
|
||||
struct wl_buffer *wl_buffer;
|
||||
bool available;
|
||||
} Buffer;
|
||||
|
||||
typedef struct wayland_state {
|
||||
struct wl_display *wl_display;
|
||||
struct wl_registry *wl_registry;
|
||||
struct wl_shm *wl_shm;
|
||||
struct wl_compositor *wl_compositor;
|
||||
struct wl_subcompositor *wl_subcompositor;
|
||||
struct wl_output *wl_output;
|
||||
struct wl_seat *wl_seat;
|
||||
struct wl_pointer *pointer;
|
||||
struct xdg_wm_base *xdg_wm_base;
|
||||
struct wl_surface *wl_surface;
|
||||
struct wl_surface *wl_subsurfaces_surface;
|
||||
struct wl_subsurface *wl_subsurfaces_subsurface;
|
||||
struct xdg_surface *xdg_surface;
|
||||
struct xdg_toplevel *xdg_toplevel;
|
||||
struct wl_cursor_theme *cursor_theme;
|
||||
struct wl_cursor *default_cursor;
|
||||
struct wl_surface *cursor_surface;
|
||||
} wayland_state;
|
||||
|
||||
// Actually the following Rect machinery is unused since we don't use shapes
|
||||
typedef int RECT_T;
|
||||
|
||||
#define RECT_EQ_X(r1,r2) ((r1) == (r2))
|
||||
#define RECT_SET(r,xx,yy,ww,hh) ;
|
||||
#define RECT_INC_HEIGHT(r) ;
|
||||
|
||||
#endif
|
||||
@@ -1,517 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2023, JetBrains s.r.o.. All rights reserved.
|
||||
*
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
#include "splashscreen_impl.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <wayland-client.h>
|
||||
#include <wayland-cursor.h>
|
||||
#include <pthread.h>
|
||||
#include <sys/mman.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "memory_utils.h"
|
||||
#include "xdg-shell-client-protocol.h"
|
||||
|
||||
static const int BUFFERS_COUNT = 3;
|
||||
static bool is_cursor_animated = false;
|
||||
|
||||
#define NULL_CHECK_CLEANUP(val, message) if (val == NULL) { fprintf(stderr, "%s\n", message); goto cleanup; }
|
||||
#define NULL_CHECK(val, message) if (val == NULL) { fprintf(stderr, "%s\n", message); return false; }
|
||||
#define DESTROY_NOT_NULL(val, destructor) if (val != NULL) { destructor(val); }
|
||||
|
||||
bool SplashReconfigureNow(Splash * splash);
|
||||
void SplashRedrawWindow(Splash * splash);
|
||||
void SplashReconfigure(Splash * splash);
|
||||
|
||||
static bool
|
||||
alloc_buffer(int width, int height, struct wl_shm *wl_shm, Buffer *buffer, int format, int format_size) {
|
||||
int size = width * height * format_size;
|
||||
int fd = AllocateSharedMemoryFile(size, "splashscreen");
|
||||
buffer->size = size;
|
||||
if (fd == -1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
buffer->data = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
|
||||
if (buffer->data == MAP_FAILED) {
|
||||
close(fd);
|
||||
return false;
|
||||
}
|
||||
|
||||
struct wl_shm_pool *pool = wl_shm_create_pool(wl_shm, fd, size);
|
||||
buffer->wl_buffer = wl_shm_pool_create_buffer(pool, 0, width, height, width * format_size, format);
|
||||
if (buffer->wl_buffer == NULL) {
|
||||
return false;
|
||||
}
|
||||
wl_shm_pool_destroy(pool);
|
||||
close(fd);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void
|
||||
destroy_buffer(Buffer *buffer) {
|
||||
if (buffer->data != MAP_FAILED && buffer->data != NULL) {
|
||||
munmap(buffer->data, buffer->size);
|
||||
}
|
||||
if (buffer->wl_buffer) {
|
||||
wl_buffer_destroy(buffer->wl_buffer);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
registry_global(void *data, struct wl_registry *wl_registry, uint32_t name, const char *interface, uint32_t version) {
|
||||
wayland_state *state = data;
|
||||
|
||||
if (strcmp(interface, wl_shm_interface.name) == 0) {
|
||||
state->wl_shm = wl_registry_bind(
|
||||
wl_registry, name, &wl_shm_interface, 1);
|
||||
} else if (strcmp(interface, wl_compositor_interface.name) == 0) {
|
||||
state->wl_compositor = wl_registry_bind(
|
||||
wl_registry, name, &wl_compositor_interface, 4);
|
||||
} else if (strcmp(interface, wl_seat_interface.name) == 0) {
|
||||
state->wl_seat = wl_registry_bind(
|
||||
wl_registry, name, &wl_seat_interface, 1);
|
||||
} else if (strcmp(interface, wl_subcompositor_interface.name) == 0) {
|
||||
state->wl_subcompositor = wl_registry_bind(
|
||||
wl_registry, name, &wl_subcompositor_interface, 1);
|
||||
} else if (strcmp(interface, xdg_wm_base_interface.name) == 0) {
|
||||
state->xdg_wm_base = wl_registry_bind(
|
||||
wl_registry, name, &xdg_wm_base_interface, 1);
|
||||
} else if (strcmp(interface, wl_output_interface.name) == 0) {
|
||||
state->wl_output = wl_registry_bind(
|
||||
wl_registry, name, &wl_output_interface, 2);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
registry_global_remove(void *data, struct wl_registry *wl_registry, uint32_t name) {
|
||||
}
|
||||
|
||||
static const struct wl_registry_listener wl_registry_listener = {
|
||||
.global = registry_global,
|
||||
.global_remove = registry_global_remove,
|
||||
};
|
||||
|
||||
static void
|
||||
wl_buffer_release(void *data, struct wl_buffer *wl_buffer) {
|
||||
Buffer* buffer = data;
|
||||
buffer->available = true;
|
||||
}
|
||||
|
||||
static const struct wl_buffer_listener wl_buffer_listener = {
|
||||
.release = wl_buffer_release,
|
||||
};
|
||||
|
||||
static void
|
||||
wl_output_geometry(void *data, struct wl_output * wl_output, int32_t x, int32_t y, int32_t physical_width,
|
||||
int32_t physical_height, int32_t subpixel, const char *make, const char *model, int32_t transform) {
|
||||
}
|
||||
|
||||
static void
|
||||
wl_output_scale(void *data, struct wl_output *wl_output, int32_t factor) {
|
||||
ScreenInfo *output = data;
|
||||
|
||||
output->scale = factor;
|
||||
}
|
||||
|
||||
static void
|
||||
wl_output_mode(
|
||||
void *data,
|
||||
struct wl_output *wl_output,
|
||||
uint32_t flags,
|
||||
int32_t width,
|
||||
int32_t height,
|
||||
int32_t refresh) {
|
||||
ScreenInfo *output = data;
|
||||
|
||||
output->width = width;
|
||||
output->height = height;
|
||||
}
|
||||
|
||||
static void
|
||||
wl_output_done(
|
||||
void *data,
|
||||
struct wl_output *wl_output) {
|
||||
}
|
||||
|
||||
struct wl_output_listener wl_output_listener = {
|
||||
.geometry = &wl_output_geometry,
|
||||
.mode = &wl_output_mode,
|
||||
.done = &wl_output_done,
|
||||
.scale = &wl_output_scale
|
||||
};
|
||||
|
||||
void
|
||||
xdg_surface_configure(void *data, struct xdg_surface *xdg_surface, uint32_t serial) {
|
||||
struct Splash *splash = data;
|
||||
|
||||
xdg_surface_ack_configure(xdg_surface, serial);
|
||||
SplashReconfigure(splash);
|
||||
}
|
||||
|
||||
static const struct xdg_surface_listener xdg_surface_listener = {
|
||||
.configure = xdg_surface_configure,
|
||||
};
|
||||
|
||||
static void
|
||||
handle_toplevel_configure(void *data, struct xdg_toplevel *toplevel, int32_t width, int32_t height,
|
||||
struct wl_array *states) {
|
||||
struct Splash *splash = data;
|
||||
|
||||
if (width > 0 && height > 0 && (splash->window_width == 0 || splash->window_height == 0)) {
|
||||
splash->window_width = width;
|
||||
splash->window_height = height;
|
||||
}
|
||||
|
||||
SplashReconfigure(splash);
|
||||
}
|
||||
|
||||
static const struct xdg_toplevel_listener xdg_toplevel_listener = {
|
||||
.configure = handle_toplevel_configure,
|
||||
};
|
||||
|
||||
static void
|
||||
pointer_handle_enter(void *data, struct wl_pointer *pointer, uint32_t serial, struct wl_surface *surface,
|
||||
wl_fixed_t sx, wl_fixed_t sy) {
|
||||
wayland_state *state = data;
|
||||
|
||||
is_cursor_animated = true;
|
||||
struct wl_cursor_image *image = state->default_cursor->images[0];
|
||||
wl_pointer_set_cursor(pointer, serial, state->cursor_surface, image->hotspot_x, image->hotspot_y);
|
||||
}
|
||||
|
||||
static void
|
||||
pointer_handle_leave(void *data, struct wl_pointer *pointer, uint32_t serial, struct wl_surface *surface) {
|
||||
is_cursor_animated = false;
|
||||
}
|
||||
|
||||
static void
|
||||
pointer_handle_motion(void *data, struct wl_pointer *pointer, uint32_t time, wl_fixed_t sx, wl_fixed_t sy) {
|
||||
}
|
||||
|
||||
static void
|
||||
pointer_handle_button(void *data, struct wl_pointer *wl_pointer,
|
||||
uint32_t serial, uint32_t time, uint32_t button, uint32_t state) {
|
||||
}
|
||||
|
||||
static const struct wl_pointer_listener pointer_listener = {
|
||||
.enter = pointer_handle_enter,
|
||||
.leave = pointer_handle_leave,
|
||||
.motion = pointer_handle_motion,
|
||||
.button = pointer_handle_button,
|
||||
};
|
||||
|
||||
static void
|
||||
seat_handle_capabilities(void *data, struct wl_seat *seat, enum wl_seat_capability caps) {
|
||||
wayland_state *state = data;
|
||||
|
||||
if ((caps & WL_SEAT_CAPABILITY_POINTER) && !state->pointer) {
|
||||
state->pointer = wl_seat_get_pointer(seat);
|
||||
wl_pointer_add_listener(state->pointer, &pointer_listener, state);
|
||||
} else if (!(caps & WL_SEAT_CAPABILITY_POINTER) && state->pointer) {
|
||||
wl_pointer_destroy(state->pointer);
|
||||
state->pointer = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static const struct wl_seat_listener wl_seat_listener = {
|
||||
.capabilities = seat_handle_capabilities,
|
||||
};
|
||||
|
||||
static void
|
||||
xdg_wm_base_ping(void *data, struct xdg_wm_base *xdg_wm_base, uint32_t serial) {
|
||||
xdg_wm_base_pong(xdg_wm_base, serial);
|
||||
}
|
||||
|
||||
static const struct xdg_wm_base_listener xdg_wm_base_listener = {
|
||||
.ping = xdg_wm_base_ping,
|
||||
};
|
||||
|
||||
bool
|
||||
SplashCreateWindow(Splash * splash) {
|
||||
splash->native_scale = getNativeScaleFactor(NULL, 1);
|
||||
if (splash->native_scale == -1.0) {
|
||||
splash->native_scale = 1.0;
|
||||
}
|
||||
|
||||
wl_output_add_listener(splash->state->wl_output, &wl_output_listener, &splash->screenInfo);
|
||||
|
||||
splash->state->wl_surface = wl_compositor_create_surface(splash->state->wl_compositor);
|
||||
NULL_CHECK(splash->state->wl_surface, "Cannot create surface\n")
|
||||
splash->state->wl_subsurfaces_surface = wl_compositor_create_surface(splash->state->wl_compositor);
|
||||
NULL_CHECK(splash->state->wl_subsurfaces_surface, "Cannot create surface\n")
|
||||
wl_surface_set_buffer_scale(splash->state->wl_subsurfaces_surface, (int) splash->scaleFactor);
|
||||
wl_surface_set_buffer_scale(splash->state->wl_surface, splash->native_scale);
|
||||
|
||||
xdg_wm_base_add_listener(splash->state->xdg_wm_base, &xdg_wm_base_listener, splash->state);
|
||||
splash->state->xdg_surface = xdg_wm_base_get_xdg_surface(splash->state->xdg_wm_base, splash->state->wl_surface);
|
||||
NULL_CHECK(splash->state->xdg_surface, "Cannot get xdg_surface\n")
|
||||
xdg_surface_add_listener(splash->state->xdg_surface, &xdg_surface_listener, splash);
|
||||
|
||||
splash->state->xdg_toplevel = xdg_surface_get_toplevel(splash->state->xdg_surface);
|
||||
NULL_CHECK(splash->state->xdg_toplevel, "Cannot get xdg_toplevel\n")
|
||||
xdg_toplevel_set_maximized(splash->state->xdg_toplevel);
|
||||
xdg_toplevel_add_listener(splash->state->xdg_toplevel, &xdg_toplevel_listener, splash);
|
||||
|
||||
splash->state->cursor_surface = wl_compositor_create_surface(splash->state->wl_compositor);
|
||||
NULL_CHECK(splash->state->cursor_surface, "Cannot get cursor_surface\n")
|
||||
wl_seat_add_listener(splash->state->wl_seat, &wl_seat_listener, splash->state);
|
||||
|
||||
splash->state->wl_subsurfaces_subsurface = wl_subcompositor_get_subsurface(
|
||||
splash->state->wl_subcompositor, splash->state->wl_subsurfaces_surface, splash->state->wl_surface);
|
||||
NULL_CHECK(splash->state->wl_subsurfaces_subsurface, "Cannot create subsurface\n")
|
||||
wl_subsurface_set_desync(splash->state->wl_subsurfaces_subsurface);
|
||||
|
||||
splash->state->cursor_theme = wl_cursor_theme_load(NULL, 32, splash->state->wl_shm);
|
||||
NULL_CHECK(splash->state->cursor_theme, "unable to load default theme\n")
|
||||
splash->state->default_cursor = wl_cursor_theme_get_cursor(splash->state->cursor_theme, "watch");
|
||||
NULL_CHECK(splash->state->default_cursor, "unable to load pointer\n")
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
int
|
||||
SplashInitPlatform(Splash * splash) {
|
||||
pthread_mutex_init(&splash->lock, NULL);
|
||||
|
||||
splash->buffers = 0;
|
||||
splash->window_width = 0;
|
||||
splash->window_height = 0;
|
||||
splash->state = malloc(sizeof(wayland_state));
|
||||
NULL_CHECK_CLEANUP(splash->state, "Cannot allocate enough memory\n")
|
||||
splash->buffers = malloc(sizeof(Buffer) * BUFFERS_COUNT);
|
||||
NULL_CHECK_CLEANUP(splash->buffers, "Cannot allocate enough memory\n")
|
||||
|
||||
splash->state->wl_display = NULL;
|
||||
splash->state->wl_registry = NULL;
|
||||
|
||||
splash->state->wl_shm = NULL;
|
||||
splash->state->wl_compositor = NULL;
|
||||
splash->state->wl_subcompositor = NULL;
|
||||
splash->state->wl_seat = NULL;
|
||||
splash->state->xdg_wm_base = NULL;
|
||||
splash->state->wl_subsurfaces_subsurface = NULL;
|
||||
|
||||
splash->state->wl_surface = NULL;
|
||||
splash->state->wl_subsurfaces_surface = NULL;
|
||||
splash->state->xdg_surface = NULL;
|
||||
splash->state->xdg_toplevel = NULL;
|
||||
splash->state->pointer = NULL;
|
||||
splash->state->cursor_surface = NULL;
|
||||
|
||||
splash->main_buffer.wl_buffer = NULL;
|
||||
splash->main_buffer.data = NULL;
|
||||
for (int i = 0; i < BUFFERS_COUNT; i++) {
|
||||
splash->buffers[i].wl_buffer = NULL;
|
||||
splash->buffers[i].data = NULL;
|
||||
splash->buffers[i].available = false;
|
||||
}
|
||||
|
||||
splash->byteAlignment = 1;
|
||||
splash->maskRequired = 0;
|
||||
initFormat(&splash->screenFormat, 0xff0000, 0xff00, 0xff, 0xff000000);
|
||||
splash->screenFormat.byteOrder = BYTE_ORDER_LSBFIRST;
|
||||
splash->screenFormat.depthBytes = 4;
|
||||
|
||||
splash->state->wl_display = wl_display_connect(NULL);
|
||||
NULL_CHECK_CLEANUP(splash->state->wl_display, "Cannot connect to display\n")
|
||||
|
||||
splash->state->wl_registry = wl_display_get_registry(splash->state->wl_display);
|
||||
NULL_CHECK_CLEANUP(splash->state->wl_registry, "Cannot get display's registry\n")
|
||||
wl_registry_add_listener(splash->state->wl_registry, &wl_registry_listener, splash->state);
|
||||
wl_display_roundtrip(splash->state->wl_display);
|
||||
|
||||
NULL_CHECK_CLEANUP(splash->state->wl_shm, "wl_shm not initialized\n")
|
||||
NULL_CHECK_CLEANUP(splash->state->wl_compositor, "wl_compositor not initialized\n")
|
||||
NULL_CHECK_CLEANUP(splash->state->wl_subcompositor, "wl_subcompositor not initialized\n")
|
||||
NULL_CHECK_CLEANUP(splash->state->wl_seat, "wl_seat not initialized\n")
|
||||
NULL_CHECK_CLEANUP(splash->state->xdg_wm_base, "xdg_wm_base not initialized\n")
|
||||
NULL_CHECK_CLEANUP(splash->state->wl_output, "wl_output not initialized\n")
|
||||
|
||||
return true;
|
||||
cleanup:
|
||||
SplashDonePlatform(splash);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
SplashReconfigureNow(Splash * splash) {
|
||||
int splash_scale = (int) splash->scaleFactor;
|
||||
int offsetX = splash->screenInfo.width - splash->window_width * splash->screenInfo.scale;
|
||||
int offsetY = splash->screenInfo.height - splash->window_height * splash->screenInfo.scale;
|
||||
splash->x = (splash->screenInfo.width - splash->width / splash_scale) / 2;
|
||||
splash->y = (splash->screenInfo.height - splash->height / splash_scale) / 2;
|
||||
int localX = (splash->x - offsetX) / splash->screenInfo.scale;
|
||||
int localY = (splash->y - offsetY) / splash->screenInfo.scale;
|
||||
wl_subsurface_set_position(splash->state->wl_subsurfaces_subsurface, localX, localY);
|
||||
|
||||
destroy_buffer(&splash->main_buffer);
|
||||
for (int i = 0; i < BUFFERS_COUNT; i++) {
|
||||
destroy_buffer(&splash->buffers[i]);
|
||||
splash->buffers[i].available = false;
|
||||
}
|
||||
|
||||
struct wl_region *region = wl_compositor_create_region(splash->state->wl_compositor);
|
||||
wl_region_subtract(region, 0, 0, splash->window_width, splash->window_height);
|
||||
wl_region_add(region, localX, localY, splash->width / splash_scale, splash->height / splash_scale);
|
||||
wl_surface_set_input_region(splash->state->wl_surface, region);
|
||||
wl_surface_set_opaque_region(splash->state->wl_surface, region);
|
||||
wl_region_destroy(region);
|
||||
|
||||
for (int i = 0; i < BUFFERS_COUNT; i++) {
|
||||
if (!alloc_buffer(splash->width, splash->height, splash->state->wl_shm, &splash->buffers[i],
|
||||
WL_SHM_FORMAT_XRGB8888, 4)) {
|
||||
fprintf(stderr, "%s\n", "Cannot allocate enough memory");
|
||||
return false;
|
||||
}
|
||||
wl_buffer_add_listener(splash->buffers[i].wl_buffer, &wl_buffer_listener, &splash->buffers[i]);
|
||||
splash->buffers[i].available = true;
|
||||
}
|
||||
|
||||
if (!alloc_buffer(splash->window_width * splash->native_scale, splash->window_height * splash->native_scale,
|
||||
splash->state->wl_shm, &splash->main_buffer, WL_SHM_FORMAT_ARGB8888, 4)) {
|
||||
fprintf(stderr, "%s\n", "Cannot allocate enough memory");
|
||||
return false;
|
||||
}
|
||||
memset(splash->main_buffer.data, 0, splash->window_width * splash->window_height * 4);
|
||||
wl_surface_attach(splash->state->wl_surface, splash->main_buffer.wl_buffer, 0, 0);
|
||||
wl_surface_damage(splash->state->wl_surface, 0, 0, splash->window_width, splash->window_height);
|
||||
wl_surface_commit(splash->state->wl_surface);
|
||||
|
||||
SplashRedrawWindow(splash);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
SplashRedrawWindow(Splash * splash) {
|
||||
for (int i = 0; i < BUFFERS_COUNT; i++) {
|
||||
if (splash->buffers[i].available) {
|
||||
splash->screenData = splash->buffers[i].data;
|
||||
SplashUpdateScreenData(splash, true);
|
||||
wl_surface_attach(splash->state->wl_subsurfaces_surface, splash->buffers[i].wl_buffer, 0, 0);
|
||||
wl_surface_damage(splash->state->wl_subsurfaces_surface, 0, 0, splash->window_width, splash->window_height);
|
||||
wl_surface_commit(splash->state->wl_subsurfaces_surface);
|
||||
splash->buffers[i].available = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
FlushEvents(Splash * splash) {
|
||||
return wl_display_flush(splash->state->wl_display) != -1;
|
||||
}
|
||||
|
||||
bool
|
||||
DispatchEvents(Splash * splash) {
|
||||
return wl_display_dispatch(splash->state->wl_display) != -1;
|
||||
}
|
||||
|
||||
int
|
||||
GetDisplayFD(Splash * splash) {
|
||||
return wl_display_get_fd(splash->state->wl_display);
|
||||
}
|
||||
|
||||
void
|
||||
SplashUpdateCursor(Splash * splash) {
|
||||
static int index = 0;
|
||||
|
||||
if (is_cursor_animated) {
|
||||
wayland_state *state = splash->state;
|
||||
struct wl_buffer *buffer;
|
||||
struct wl_cursor *cursor = state->default_cursor;
|
||||
struct wl_cursor_image *image;
|
||||
|
||||
if (cursor) {
|
||||
image = state->default_cursor->images[index];
|
||||
index = (index + 1) % (state->default_cursor->image_count);
|
||||
buffer = wl_cursor_image_get_buffer(image);
|
||||
if (!buffer)
|
||||
return;
|
||||
wl_surface_attach(state->cursor_surface, buffer, 0, 0);
|
||||
wl_surface_damage(state->cursor_surface, 0, 0, image->width, image->height);
|
||||
wl_surface_commit(state->cursor_surface);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SplashCleanupPlatform(Splash * splash) {
|
||||
}
|
||||
|
||||
void
|
||||
SplashDonePlatform(Splash * splash) {
|
||||
pthread_mutex_destroy(&splash->lock);
|
||||
|
||||
if (splash == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
DESTROY_NOT_NULL(splash->state->wl_shm, wl_shm_destroy)
|
||||
DESTROY_NOT_NULL(splash->state->wl_compositor, wl_compositor_destroy)
|
||||
DESTROY_NOT_NULL(splash->state->wl_subcompositor, wl_subcompositor_destroy)
|
||||
DESTROY_NOT_NULL(splash->state->wl_seat, wl_seat_destroy)
|
||||
DESTROY_NOT_NULL(splash->state->xdg_wm_base, xdg_wm_base_destroy)
|
||||
DESTROY_NOT_NULL(splash->state->wl_subsurfaces_subsurface, wl_subsurface_destroy)
|
||||
|
||||
DESTROY_NOT_NULL(splash->state->wl_surface, wl_surface_destroy)
|
||||
DESTROY_NOT_NULL(splash->state->wl_subsurfaces_surface, wl_surface_destroy)
|
||||
DESTROY_NOT_NULL(splash->state->xdg_surface, xdg_surface_destroy)
|
||||
DESTROY_NOT_NULL(splash->state->xdg_toplevel, xdg_toplevel_destroy)
|
||||
DESTROY_NOT_NULL(splash->state->pointer, wl_pointer_destroy)
|
||||
DESTROY_NOT_NULL(splash->state->cursor_surface, wl_surface_destroy)
|
||||
|
||||
destroy_buffer(&splash->main_buffer);
|
||||
if (splash->buffers) {
|
||||
for (int i = 0; i < BUFFERS_COUNT; i++) {
|
||||
destroy_buffer(&splash->buffers[i]);
|
||||
}
|
||||
free(splash->buffers);
|
||||
}
|
||||
|
||||
if (splash->state->wl_display) {
|
||||
wl_display_flush(splash->state->wl_display);
|
||||
wl_display_disconnect(splash->state->wl_display);
|
||||
}
|
||||
|
||||
free(splash->state);
|
||||
}
|
||||
|
||||
void
|
||||
SplashSetup(Splash * splash) {
|
||||
}
|
||||
|
||||
void
|
||||
SplashUpdateShape(Splash * splash) {
|
||||
}
|
||||
|
||||
void
|
||||
SplashInitFrameShape(Splash * splash, int imageIndex) {
|
||||
}
|
||||
@@ -55,7 +55,4 @@ public class PlatformGraphicsInfo {
|
||||
"but this program performed an operation which requires it.";
|
||||
}
|
||||
|
||||
public static String getSplashScreenLib() {
|
||||
return "splashscreen";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,6 @@ import java.awt.datatransfer.UnsupportedFlavorException;
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
|
||||
import sun.awt.datatransfer.ClipboardTransferable;
|
||||
import sun.awt.datatransfer.DataTransferer;
|
||||
import sun.awt.datatransfer.SunClipboard;
|
||||
|
||||
@@ -92,39 +91,6 @@ final class WClipboard extends SunClipboard {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ======================= JBR-5980 Pasting from clipboard not working reliably in Windows =======================
|
||||
private static final boolean isContentsCacheDisabled; // initialized in the static block below
|
||||
private static final boolean areOwnershipExtraChecksEnabled; // initialized in the static block below
|
||||
|
||||
@Override
|
||||
public synchronized Transferable getContents(Object requestor) {
|
||||
if (isContentsCacheDisabled) {
|
||||
// JBR-5980: sometimes the cache (this.contents) doesn't reset when something gets copied to the
|
||||
// system clipboard outside of the Java app. This workaround allows to disable the caching, so
|
||||
// each call to getContents will result in reading the clipboard content from the system through
|
||||
// Win32 Clipbaord API.
|
||||
|
||||
return new ClipboardTransferable((SunClipboard)this);
|
||||
}
|
||||
|
||||
return super.getContents(requestor);
|
||||
}
|
||||
|
||||
// Upcall from native
|
||||
private void ensureNoOwnedData() {
|
||||
boolean thereAreOwnedData = false;
|
||||
synchronized (this) {
|
||||
thereAreOwnedData = ((this.owner != null) || (this.contents != null));
|
||||
}
|
||||
if (thereAreOwnedData) {
|
||||
// to properly clear everything
|
||||
lostOwnershipImpl();
|
||||
}
|
||||
}
|
||||
// ===============================================================================================================
|
||||
|
||||
|
||||
private void lostSelectionOwnershipImpl() {
|
||||
lostOwnershipImpl();
|
||||
}
|
||||
@@ -155,28 +121,9 @@ final class WClipboard extends SunClipboard {
|
||||
*/
|
||||
private native void publishClipboardData(long format, byte[] bytes);
|
||||
|
||||
private static native void init(boolean areOwnershipExtraChecksEnabled);
|
||||
private static native void init();
|
||||
static {
|
||||
// ====================== JBR-5980 Pasting from clipboard not working reliably in Windows ======================
|
||||
boolean flagInitializer = false; // let's fall back in the default behavior
|
||||
try {
|
||||
// is "false" by default due to JBR-6267
|
||||
flagInitializer =
|
||||
"true".equalsIgnoreCase(System.getProperty("awt.windows.clipboard.cache.disabled", "false"));
|
||||
} catch (Throwable ignored) {
|
||||
}
|
||||
isContentsCacheDisabled = flagInitializer;
|
||||
|
||||
flagInitializer = false; // let's fall back in the default behavior
|
||||
try {
|
||||
flagInitializer =
|
||||
"true".equalsIgnoreCase(System.getProperty("awt.windows.clipboard.extraOwnershipChecksEnabled", "true"));
|
||||
} catch (Throwable ignored) {
|
||||
}
|
||||
areOwnershipExtraChecksEnabled = flagInitializer;
|
||||
// =============================================================================================================
|
||||
|
||||
init(areOwnershipExtraChecksEnabled);
|
||||
init();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -37,7 +37,9 @@
|
||||
jmethodID AwtClipboard::lostSelectionOwnershipMID;
|
||||
jobject AwtClipboard::theCurrentClipboard;
|
||||
|
||||
volatile LONG /* BOOL */ AwtClipboard::isGettingOwnership = FALSE;
|
||||
/* This flag is set while we call EmptyClipboard to indicate to
|
||||
WM_DESTROYCLIPBOARD handler that we are not losing ownership */
|
||||
BOOL AwtClipboard::isGettingOwnership = FALSE;
|
||||
|
||||
volatile jmethodID AwtClipboard::handleContentsChangedMID;
|
||||
volatile BOOL AwtClipboard::isClipboardViewerRegistered = FALSE;
|
||||
@@ -49,8 +51,6 @@ volatile BOOL AwtClipboard::isClipboardViewerRegistered = FALSE;
|
||||
*/
|
||||
|
||||
void AwtClipboard::LostOwnership(JNIEnv *env) {
|
||||
(void)::InterlockedExchange(&AwtClipboard::isOwner, FALSE); // isOwner = FALSE;
|
||||
|
||||
if (theCurrentClipboard != NULL) {
|
||||
env->CallVoidMethod(theCurrentClipboard, lostSelectionOwnershipMID);
|
||||
DASSERT(!safe_ExceptionOccurred(env));
|
||||
@@ -93,52 +93,6 @@ void AwtClipboard::UnregisterClipboardViewer(JNIEnv *env) {
|
||||
CATCH_BAD_ALLOC;
|
||||
}
|
||||
|
||||
|
||||
// ======================== JBR-5980 Pasting from clipboard not working reliably in Windows ===========================
|
||||
volatile BOOL AwtClipboard::areOwnershipExtraChecksEnabled = FALSE;
|
||||
volatile LONG /* BOOL */ AwtClipboard::isOwner = FALSE;
|
||||
jmethodID AwtClipboard::ensureNoOwnedDataMID = nullptr;
|
||||
|
||||
void AwtClipboard::SetOwnershipExtraChecksEnabled(BOOL enabled) {
|
||||
areOwnershipExtraChecksEnabled = enabled;
|
||||
}
|
||||
|
||||
void AwtClipboard::ExtraCheckOfOwnership() {
|
||||
if (areOwnershipExtraChecksEnabled != TRUE) {
|
||||
return;
|
||||
}
|
||||
|
||||
JNIEnv* const env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
|
||||
if (env == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
const bool isOwner =
|
||||
// Checks the actual value of AwtClipboard::isOwner without altering it
|
||||
(::InterlockedCompareExchange(&AwtClipboard::isOwner, TRUE, TRUE) != LONG{FALSE});
|
||||
if (isOwner) {
|
||||
const HWND toolkitHwnd = AwtToolkit::GetInstance().GetHWnd();
|
||||
|
||||
if (::OpenClipboard(toolkitHwnd) == 0) {
|
||||
// failed to open the clipboard
|
||||
return;
|
||||
}
|
||||
const HWND clipboardOwnerHwnd = ::GetClipboardOwner();
|
||||
::CloseClipboard();
|
||||
|
||||
if (clipboardOwnerHwnd != toolkitHwnd) {
|
||||
AwtClipboard::LostOwnership(env);
|
||||
}
|
||||
} else {
|
||||
if ((theCurrentClipboard != nullptr) && (ensureNoOwnedDataMID != nullptr)) {
|
||||
env->CallVoidMethod(theCurrentClipboard, ensureNoOwnedDataMID);
|
||||
DASSERT(!safe_ExceptionOccurred(env));
|
||||
}
|
||||
}
|
||||
}
|
||||
// ====================================================================================================================
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
void awt_clipboard_uninitialize(JNIEnv *env) {
|
||||
@@ -157,7 +111,7 @@ void awt_clipboard_uninitialize(JNIEnv *env) {
|
||||
* Signature: ()V
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
Java_sun_awt_windows_WClipboard_init(JNIEnv *env, jclass cls, jboolean areOwnershipExtraChecksEnabled)
|
||||
Java_sun_awt_windows_WClipboard_init(JNIEnv *env, jclass cls)
|
||||
{
|
||||
TRY;
|
||||
|
||||
@@ -165,11 +119,6 @@ Java_sun_awt_windows_WClipboard_init(JNIEnv *env, jclass cls, jboolean areOwners
|
||||
env->GetMethodID(cls, "lostSelectionOwnershipImpl", "()V");
|
||||
DASSERT(AwtClipboard::lostSelectionOwnershipMID != NULL);
|
||||
|
||||
AwtClipboard::ensureNoOwnedDataMID = env->GetMethodID(cls, "ensureNoOwnedData", "()V");
|
||||
DASSERT(AwtClipboard::ensureNoOwnedDataMID != nullptr);
|
||||
|
||||
AwtClipboard::SetOwnershipExtraChecksEnabled( (areOwnershipExtraChecksEnabled == JNI_TRUE) ? TRUE : FALSE );
|
||||
|
||||
CATCH_BAD_ALLOC;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,14 +35,7 @@
|
||||
|
||||
class AwtClipboard {
|
||||
private:
|
||||
// This flag is set while we call EmptyClipboard to indicate to WM_DESTROYCLIPBOARD handler that
|
||||
// we are not losing ownership
|
||||
// Although the variable's type is LONG, it's supposed to be treated as BOOL,
|
||||
// with the only possible values TRUE and FALSE.
|
||||
// Also, all accesses to the variable (both reading and writing) MUST be performed using
|
||||
// Windows Interlocked Variable Access API.
|
||||
// LONG is only used to make sure it's safe to pass the variable to ::Interlocked*** functions.
|
||||
static volatile LONG /* BOOL */ isGettingOwnership;
|
||||
static BOOL isGettingOwnership;
|
||||
static volatile BOOL isClipboardViewerRegistered;
|
||||
static volatile jmethodID handleContentsChangedMID;
|
||||
|
||||
@@ -51,40 +44,19 @@ public:
|
||||
static jobject theCurrentClipboard;
|
||||
|
||||
INLINE static void GetOwnership() {
|
||||
(void)::InterlockedExchange(&isGettingOwnership, TRUE); // isGettingOwnership = TRUE
|
||||
AwtClipboard::isGettingOwnership = TRUE;
|
||||
VERIFY(EmptyClipboard());
|
||||
(void)::InterlockedExchange(&isGettingOwnership, FALSE); // isGettingOwnership = FALSE
|
||||
(void)::InterlockedExchange(&isOwner, TRUE); // isOwner = TRUE;
|
||||
AwtClipboard::isGettingOwnership = FALSE;
|
||||
}
|
||||
|
||||
INLINE static BOOL IsGettingOwnership() {
|
||||
// Returns the actual value of isGettingOwnership without altering it
|
||||
return ::InterlockedCompareExchange(&isGettingOwnership, TRUE, TRUE) != LONG{FALSE};
|
||||
return isGettingOwnership;
|
||||
}
|
||||
|
||||
static void LostOwnership(JNIEnv *env);
|
||||
static void WmClipboardUpdate(JNIEnv *env);
|
||||
static void RegisterClipboardViewer(JNIEnv *env, jobject jclipboard);
|
||||
static void UnregisterClipboardViewer(JNIEnv *env);
|
||||
|
||||
// ===================== JBR-5980 Pasting from clipboard not working reliably in Windows ==========================
|
||||
public:
|
||||
static jmethodID ensureNoOwnedDataMID;
|
||||
|
||||
public:
|
||||
static void SetOwnershipExtraChecksEnabled(BOOL enabled);
|
||||
// Checks if ownership has been lost since the last check or the last acquiring of ownership
|
||||
static void ExtraCheckOfOwnership();
|
||||
|
||||
private:
|
||||
static volatile BOOL areOwnershipExtraChecksEnabled;
|
||||
// Although the variable's type is LONG, it's supposed to be treated as BOOL,
|
||||
// with the only possible values TRUE and FALSE.
|
||||
// Also, all accesses to the variable (both reading and writing) MUST be performed using
|
||||
// Windows Interlocked Variable Access API.
|
||||
// LONG is only used to make sure it's safe to pass the variable to ::Interlocked*** functions.
|
||||
static volatile LONG /* BOOL */ isOwner;
|
||||
// ================================================================================================================
|
||||
};
|
||||
|
||||
#endif /* AWT_CLIPBOARD_H */
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
#include "jlong.h"
|
||||
#include "awt_AWTEvent.h"
|
||||
#include "awt_BitmapUtil.h"
|
||||
#include "awt_Clipboard.h"
|
||||
#include "awt_Component.h"
|
||||
#include "awt_Cursor.h"
|
||||
#include "awt_Dimension.h"
|
||||
@@ -1604,12 +1603,6 @@ LRESULT AwtComponent::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
|
||||
}
|
||||
break;
|
||||
}
|
||||
case WM_ACTIVATEAPP:
|
||||
if (wParam == TRUE) {
|
||||
// the window is being activated, let's check if we still own the clipboard
|
||||
AwtClipboard::ExtraCheckOfOwnership();
|
||||
}
|
||||
break;
|
||||
case WM_MOUSEACTIVATE: {
|
||||
AwtWindow *window = GetContainer();
|
||||
if (window && window->IsFocusableWindow()) {
|
||||
|
||||
@@ -218,7 +218,7 @@ SplashRedrawWindow(Splash * splash)
|
||||
return;
|
||||
}
|
||||
|
||||
SplashUpdateScreenData(splash, false);
|
||||
SplashUpdateScreenData(splash);
|
||||
if (splash->isLayered) {
|
||||
BLENDFUNCTION bf;
|
||||
POINT ptSrc;
|
||||
|
||||
@@ -47,29 +47,30 @@
|
||||
|
||||
# :hotspot_compiler
|
||||
|
||||
compiler/ciReplay/TestInlining.java 8300210 generic-all
|
||||
compiler/ciReplay/TestServerVM.java NOBUG generic-all
|
||||
compiler/ciReplay/TestInlining.java NOBUG generic-all
|
||||
compiler/ciReplay/TestIncrementalInlining.java NOBUG generic-all
|
||||
compiler/ciReplay/TestInliningProtectionDomain.java NOBUG generic-all
|
||||
compiler/ciReplay/TestLambdas.java 8300210 generic-all
|
||||
compiler/ciReplay/TestServerVM.java 8300210 generic-all
|
||||
compiler/ciReplay/TestLambdas.java NOBUG generic-all
|
||||
compiler/ciReplay/TestUnresolvedClasses.java NOBUG generic-all
|
||||
|
||||
#############################################################################
|
||||
|
||||
# :hotspot_gc
|
||||
|
||||
gc/stress/gcold/TestGCOldWithShenandoah.java#iu-aggressive NOBUG generic-all timeout
|
||||
|
||||
#############################################################################
|
||||
|
||||
# :hotspot_runtime
|
||||
|
||||
runtime/cds/appcds/dynamicArchive/TestDynamicDumpAtOom.java JBR-6291 generic-all
|
||||
#runtime/CompressedOops/CompressedClassPointers.java 8305765 generic-all
|
||||
|
||||
#############################################################################
|
||||
|
||||
# :hotspot_serviceability
|
||||
|
||||
serviceability/sa/ClhsdbCDSCore.java initial_run,NOBUG generic-aarch64,macosx-all Can't attach to the core file
|
||||
#serviceability/sa/sadebugd/DebugdConnectTest.java 8239062,8270326 macosx-x64,macosx-aarch64
|
||||
|
||||
#############################################################################
|
||||
|
||||
@@ -85,4 +86,3 @@ serviceability/sa/ClhsdbCDSCore.java initial_run,NOBUG generic-aarch64,macosx-al
|
||||
#############################################################################
|
||||
|
||||
vmTestbase/gc/gctests/LargeObjects/large002/TestDescription.java NOBUG linux-all timeout
|
||||
vmTestbase/gc/gctests/StringInternSyncWithGC/StringInternSyncWithGC.java NOBUG macosx-all timeout on macstudio
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -38,19 +38,22 @@
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
|
||||
#############################################################################
|
||||
|
||||
# gtest
|
||||
|
||||
gtest/AsyncLogGtest.java initial_run generic-all
|
||||
gtest/MetaspaceGtests.java#reclaim-none-ndebug initial_run generic-all
|
||||
gtest/LargePageGtests.java#use-large-pages-sysV initial_run linux-all
|
||||
gtest/LargePageGtests.java#use-large-pages-1G initial_run linux-all
|
||||
gtest/GTestWrapper.java initial_run generic-all
|
||||
gtest/MetaspaceUtilsGtests.java initial_run generic-all
|
||||
gtest/LargePageGtests.java#use-large-pages initial_run linux-all,windows-all
|
||||
gtest/LargePageGtests.java#use-large-pages-1G initial_run linux-all
|
||||
gtest/LargePageGtests.java#use-large-pages-sysV initial_run linux-all
|
||||
gtest/MetaspaceGtests.java#balanced-no-ccs initial_run generic-all
|
||||
gtest/MetaspaceGtests.java#balanced-with-guards JBR-5718 generic-all
|
||||
gtest/MetaspaceGtests.java#default-debug JBR-5718 generic-all
|
||||
gtest/MetaspaceGtests.java#reclaim-aggressive-ndebug initial_run generic-all
|
||||
gtest/LargePageGtests.java#use-large-pages initial_run linux-all,windows-all
|
||||
gtest/MetaspaceGtests.java#reclaim-none-ndebug initial_run generic-all
|
||||
gtest/MetaspaceUtilsGtests.java initial_run generic-all
|
||||
|
||||
gtest/NativeHeapTrimmerGtest.java JBR-5718 generic-all
|
||||
gtest/NMTGtests.java#nmt-detail JBR-5718 generic-all
|
||||
@@ -61,21 +64,19 @@ gc/stress/TestReclaimStringsLeaksMemory.java initial_run windows-all
|
||||
|
||||
gc/shenandoah/TestAllocObjects.java#aggressive initial_run generic-all
|
||||
gc/shenandoah/TestAllocObjects.java#iu-aggressive initial_run generic-all
|
||||
gc/shenandoah/mxbeans/TestChurnNotifications.java#aggressive initial_run generic-all
|
||||
gc/shenandoah/mxbeans/TestChurnNotifications.java#aggressive JBR-6262 generic-all
|
||||
gc/shenandoah/mxbeans/TestChurnNotifications.java#iu initial_run linux-x64
|
||||
|
||||
# :hotspot_compiler
|
||||
|
||||
compiler/ciReplay/TestSAServer.java 8029528 generic-all
|
||||
compiler/compilercontrol/jcmd/ClearDirectivesFileStackTest.java 8225370 generic-all
|
||||
compiler/gcbarriers/UnsafeIntrinsicsTest.java#ZGenerationalDebug 8311548 generic-aarch64
|
||||
compiler/jvmci/compilerToVM/GetFlagValueTest.java 8204459 generic-all
|
||||
compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/NativeCallTest.java 8262901 macosx-aarch64
|
||||
|
||||
compiler/cpuflags/TestAESIntrinsicsOnSupportedConfig.java 8190680 generic-all
|
||||
|
||||
compiler/runtime/Test8168712.java 8211769,8211771 generic-ppc64,generic-ppc64le,linux-s390x
|
||||
runtime/Thread/ThreadCountLimit.java 8293872 linux-all
|
||||
|
||||
compiler/rtm/locking/TestRTMAbortRatio.java 8183263 generic-x64
|
||||
compiler/rtm/locking/TestRTMAbortThreshold.java 8183263 generic-x64
|
||||
@@ -89,11 +90,10 @@ compiler/rtm/locking/TestUseRTMDeopt.java 8183263 generic-x64
|
||||
compiler/rtm/locking/TestUseRTMXendForLockBusy.java 8183263 generic-x64
|
||||
compiler/rtm/print/TestPrintPreciseRTMLockingStatistics.java 8183263 generic-x64
|
||||
|
||||
compiler/c2/irTests/TestVectorConditionalMove.java 8306922 generic-all
|
||||
compiler/c2/Test8004741.java 8235801 generic-all
|
||||
|
||||
compiler/vectorapi/VectorCastShape64Test.java initial_run generic-aarch64
|
||||
compiler/vectorapi/VectorRebracket128Test.java initial_run generic-aarch64
|
||||
compiler/vectorapi/VectorRebracket128Test.java#ZSinglegen initial_run generic-aarch64
|
||||
|
||||
#############################################################################
|
||||
|
||||
@@ -108,60 +108,79 @@ gc/stress/gclocker/TestGCLockerWithParallel.java 8180622 generic-all
|
||||
gc/stress/gclocker/TestGCLockerWithG1.java 8180622 generic-all
|
||||
gc/stress/gclocker/TestGCLockerWithShenandoah.java initial_run generic-all
|
||||
gc/stress/TestJNIBlockFullGC/TestJNIBlockFullGC.java 8192647 generic-all
|
||||
gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java 8241293 macosx-x64
|
||||
gc/metaspace/TestMetaspacePerfCounters.java#id3 initial_run generic-all
|
||||
|
||||
gc/stress/gcold/TestGCOldWithShenandoah.java#aggressive NOBUG generic-all timeout
|
||||
gc/stress/gcold/TestGCOldWithShenandoah.java#iu-aggressive NOBUG generic-all timeout
|
||||
|
||||
gc/TestAllocHumongousFragment.java#iu-aggressive 8298781 generic-all
|
||||
gc/stress/gcold/TestGCOldWithShenandoah.java initial_run windows-all
|
||||
|
||||
#############################################################################
|
||||
|
||||
# :hotspot_runtime
|
||||
|
||||
runtime/CompressedOops/CompressedClassPointers.java 8262895 generic-aarch64
|
||||
runtime/CompressedOops/CompressedClassPointers.java 8305765 generic-all
|
||||
|
||||
runtime/cds/CheckDefaultArchiveFile.java JBR-4227 generic-all
|
||||
runtime/cds/SharedBaseAddress.java initial_run generic-all
|
||||
runtime/cds/TestCDSVMCrash.java JBR-6246 generic-all
|
||||
runtime/cds/appcds/CommandLineFlagCombo.java JBR-6246 generic-all
|
||||
runtime/cds/appcds/TestDumpClassListSource.java JBR-6099 generic-all
|
||||
runtime/cds/appcds/TestZGCWithCDS.java#ZGenerational 8316319 generic-all
|
||||
runtime/cds/appcds/dynamicArchive/CDSStreamTestDriver.java initial_run generic-all
|
||||
runtime/cds/appcds/dynamicArchive/TestAutoCreateSharedArchiveNoDefaultArchive.java JBR-6246 generic-all
|
||||
runtime/cds/appcds/jigsaw/modulepath/ModulePathAndCP_JFR.java 8253437 windows-x64
|
||||
runtime/cds/CheckDefaultArchiveFile.java JBR-4227 generic-all
|
||||
runtime/cds/DeterministicDump.java 8253495 generic-all
|
||||
runtime/jni/daemonDestroy/TestDaemonDestroy.java NOBUG windows-all # Expected to get exit value of [0], exit value is: [-1073741515]
|
||||
runtime/cds/appcds/methodHandles/MethodHandlesAsCollectorTest.java initial_run generic-all
|
||||
runtime/cds/appcds/methodHandles/MethodHandlesCastFailureTest.java initial_run generic-all
|
||||
runtime/cds/appcds/methodHandles/MethodHandlesGeneralTest.java initial_run generic-all
|
||||
runtime/cds/appcds/methodHandles/MethodHandlesInvokersTest.java initial_run generic-all
|
||||
runtime/cds/appcds/methodHandles/MethodHandlesPermuteArgumentsTest.java initial_run generic-all
|
||||
runtime/cds/appcds/methodHandles/MethodHandlesSpreadArgumentsTest.java initial_run generic-all
|
||||
|
||||
runtime/jni/daemonDestroy/TestDaemonDestroy.java JBR-6261 windows-x64
|
||||
runtime/jni/terminatedThread/TestTerminatedThread.java 8219652 aix-ppc64
|
||||
runtime/handshake/HandshakeSuspendExitTest.java 8294313 generic-all
|
||||
runtime/os/TestTracePageSizes.java#no-options 8267460 linux-aarch64
|
||||
runtime/os/TestTracePageSizes.java#explicit-large-page-size 8267460 linux-aarch64
|
||||
runtime/os/TestTracePageSizes.java#compiler-options 8267460 linux-aarch64
|
||||
runtime/os/TestTracePageSizes.java#G1 8267460 linux-aarch64
|
||||
runtime/os/TestTracePageSizes.java#Parallel 8267460 linux-aarch64
|
||||
runtime/os/TestTracePageSizes.java#Serial 8267460 linux-aarch64
|
||||
runtime/ErrorHandling/CreateCoredumpOnCrash.java 8267433,initial_run macosx-x64,windows-aarch64
|
||||
runtime/ErrorHandling/MachCodeFramesInErrorFile.java JBR-6258 windows-aarch64
|
||||
runtime/vthread/RedefineClass.java 8297286 generic-all
|
||||
runtime/vthread/TestObjectAllocationSampleEvent.java 8297286 generic-all
|
||||
runtime/StackGuardPages/TestStackGuardPages.java 8293452 linux-all
|
||||
|
||||
applications/jcstress/copy.java 8229852 linux-all
|
||||
|
||||
containers/docker/TestJcmd.java 8278102 linux-all
|
||||
|
||||
runtime/memory/ReserveMemory.java initial_run windows-aarch64
|
||||
runtime/memory/ReadFromNoaccessArea.java initial_run windows-aarch64
|
||||
|
||||
runtime/cds/appcds/methodHandles/MethodHandlesInvokersTest.java initial_run generic-all
|
||||
runtime/cds/appcds/methodHandles/MethodHandlesCastFailureTest.java initial_run generic-all
|
||||
runtime/cds/appcds/methodHandles/MethodHandlesGeneralTest.java initial_run generic-all
|
||||
runtime/ReservedStack/ReservedStackTestCompiler.java initial_run windows-aarch64
|
||||
runtime/cds/appcds/dynamicArchive/CDSStreamTestDriver.java initial_run generic-all
|
||||
runtime/ErrorHandling/CreateCoredumpOnCrash.java initial_run windows-aarch64
|
||||
runtime/ErrorHandling/MachCodeFramesInErrorFile.java JBR-6289 windows-aarch64
|
||||
runtime/ReservedStack/ReservedStackTest.java initial_run windows-aarch64
|
||||
runtime/cds/appcds/methodHandles/MethodHandlesPermuteArgumentsTest.java initial_run generic-all
|
||||
runtime/cds/appcds/methodHandles/MethodHandlesAsCollectorTest.java initial_run generic-all
|
||||
runtime/cds/SharedBaseAddress.java initial_run generic-all
|
||||
runtime/cds/appcds/methodHandles/MethodHandlesSpreadArgumentsTest.java initial_run generic-all
|
||||
runtime/reflect/ReflectOutOfMemoryError.java 8316060 generic-all
|
||||
|
||||
#############################################################################
|
||||
|
||||
# :hotspot_serviceability
|
||||
|
||||
serviceability/dcmd/vm/TrimLibcHeapTest.java 8312625 linux-all
|
||||
|
||||
serviceability/sa/sadebugd/DebugdConnectTest.java 8239062,8270326 macosx-x64,macosx-aarch64
|
||||
serviceability/sa/TestJmapCore.java 8294316,8267433 macosx-x64
|
||||
serviceability/sa/TestJmapCoreMetaspace.java 8294316,8267433 macosx-x64
|
||||
serviceability/sa/TestRevPtrsForInvokeDynamic.java 8241235 generic-all
|
||||
|
||||
serviceability/jvmti/ModuleAwareAgents/ThreadStart/MAAThreadStart.java 8225354 windows-all
|
||||
serviceability/jvmti/vthread/GetSetLocalTest/GetSetLocalTest.java 8286836 generic-all
|
||||
serviceability/dcmd/gc/RunFinalizationTest.java 8227120 linux-all,windows-x64
|
||||
|
||||
serviceability/sa/ClhsdbCDSCore.java 8294316,8267433 macosx-x64
|
||||
serviceability/sa/ClhsdbFindPC.java#xcomp-core 8294316,8267433,JBR-6259 macosx-x64,windows-aarch64
|
||||
serviceability/sa/ClhsdbFindPC.java#no-xcomp-core 8294316,8267433,JBR-6259 macosx-x64,linux_aarch64,windows-aarch64
|
||||
serviceability/sa/ClhsdbPmap.java#core 8294316,8267433,JBR-6259 macosx-x64,windows-aarch64
|
||||
serviceability/sa/ClhsdbPstack.java#core 8294316,8267433,JBR-6259 macosx-x64,windows-aarch64
|
||||
serviceability/sa/ClhsdbThreadContext.java JBR-6260 windows-aarch64
|
||||
serviceability/sa/TestJmapCore.java 8294316,8267433 macosx-x64
|
||||
serviceability/sa/TestJmapCoreMetaspace.java 8294316,8267433 macosx-x64
|
||||
|
||||
serviceability/attach/ConcAttachTest.java 8290043 linux-all
|
||||
serviceability/jvmti/RedefineClasses/RedefineSharedClassJFR.java JBR-6245 generic-all
|
||||
serviceability/jvmti/RedefineClasses/TestMultipleClasses.java initial_run windows-all
|
||||
serviceability/jvmti/SetBreakpoint/TestManyBreakpoints.java initial_run generic-aarch64
|
||||
|
||||
@@ -171,24 +190,17 @@ serviceability/sa/ClhsdbPrintAs.java initial_run generic-all
|
||||
serviceability/sa/ClhsdbFindPC.java#id1 initial_run generic-all
|
||||
serviceability/sa/ClhsdbFindPC.java#id2 initial_run generic-all
|
||||
serviceability/sa/ClhsdbFindPC.java#id3 initial_run generic-all
|
||||
serviceability/sa/ClhsdbFindPC.java#no-xcomp-core 8294316,8267433,JBR-6259 macosx-x64,linux_aarch64,windows-aarch64
|
||||
serviceability/sa/ClhsdbFindPC.java#no-xcomp-process 8269881 generic-all 8277079
|
||||
serviceability/sa/ClhsdbFindPC.java#xcomp-core 8294316,8267433,JBR-6259 macosx-x64,windows-aarch64
|
||||
serviceability/sa/ClhsdbCDSJstackPrintAll.java initial_run windows-aarch64
|
||||
serviceability/sa/TestClhsdbJstackLock.java initial_run windows-aarch64
|
||||
serviceability/sa/ClhsdbSource.java initial_run windows-aarch64
|
||||
serviceability/sa/ClhsdbJdis.java initial_run windows-aarch64
|
||||
serviceability/sa/TestJhsdbJstackLock.java initial_run windows-aarch64
|
||||
serviceability/sa/ClhsdbCDSCore.java initial_run generic-aarch64
|
||||
serviceability/sa/ClhsdbJstack.java#id1 initial_run windows-aarch64
|
||||
serviceability/sa/ClhsdbPstack.java#id1 initial_run generic-aarch64
|
||||
serviceability/sa/ClhsdbPstack.java#core 8294316,8267433,JBR-6259 macosx-x64,windows-aarch64
|
||||
serviceability/sa/ClhsdbPmap.java#id1 initial_run generic-all
|
||||
serviceability/sa/ClhsdbPmap.java#core 8294316,8267433,JBR-6259 macosx-x64,windows-aarch64
|
||||
serviceability/sa/ClhsdbWhere.java initial_run windows-aarch64
|
||||
serviceability/sa/ClhsdbDumpheap.java initial_run windows-aarch64
|
||||
serviceability/sa/ClhsdbThreadContext.java JBR-6260 windows-aarch64
|
||||
|
||||
serviceability/sa/TestClhsdbJstackLock.java initial_run windows-aarch64
|
||||
serviceability/sa/TestJhsdbJstackLock.java initial_run windows-aarch64
|
||||
|
||||
#############################################################################
|
||||
|
||||
@@ -204,12 +216,9 @@ serviceability/sa/TestJhsdbJstackLock.java initial_run windows-aarch64
|
||||
#############################################################################
|
||||
|
||||
vmTestbase/nsk/monitoring/MemoryPoolMBean/isCollectionUsageThresholdExceeded/isexceeded003/TestDescription.java 8153598 generic-all
|
||||
vmTestbase/nsk/monitoring/MemoryPoolMBean/isUsageThresholdExceeded/isexceeded001/TestDescription.java 8198668 generic-all
|
||||
vmTestbase/nsk/monitoring/MemoryPoolMBean/isUsageThresholdExceeded/isexceeded002/TestDescription.java 8153598 generic-all
|
||||
vmTestbase/nsk/monitoring/MemoryPoolMBean/isUsageThresholdExceeded/isexceeded003/TestDescription.java 8198668 generic-all
|
||||
vmTestbase/nsk/monitoring/MemoryPoolMBean/isUsageThresholdExceeded/isexceeded004/TestDescription.java 8153598 generic-all
|
||||
vmTestbase/nsk/monitoring/MemoryPoolMBean/isUsageThresholdExceeded/isexceeded005/TestDescription.java 8153598 generic-all
|
||||
vmTestbase/nsk/monitoring/ThreadMXBean/ThreadInfo/Deadlock/JavaDeadlock001/TestDescription.java 8060733 generic-all
|
||||
|
||||
vmTestbase/nsk/jdb/options/listconnectors/listconnectors001/listconnectors001.java initial_run windows-all
|
||||
|
||||
@@ -219,8 +228,7 @@ vmTestbase/nsk/jdi/LaunchingConnector/launchnosuspend/launchnosuspend001/TestDes
|
||||
|
||||
vmTestbase/nsk/jdi/ThreadReference/stop/stop001/TestDescription.java 7034630 generic-all
|
||||
vmTestbase/nsk/jdi/ReferenceType/instances/instances002/instances002.java initial_run linux-all
|
||||
vmTestbase/nsk/jdi/Value/type/type003/TestDescription.java time_out_intermittent macosx-all
|
||||
vmTestbase/nsk/jdi/VirtualMachine/canGetMonitorInfo/cangetmonitorinfo001/TestDescription.java JBR-6361 macosx-all
|
||||
vmTestbase/nsk/jdi/stress/ClassPrepareEvents/ClassPrepareEvents001/ClassPrepareEvents001.java
|
||||
|
||||
vmTestbase/metaspace/gc/firstGC_10m/TestDescription.java 8208250 generic-all
|
||||
vmTestbase/metaspace/gc/firstGC_50m/TestDescription.java 8208250 generic-all
|
||||
@@ -231,7 +239,9 @@ vmTestbase/nsk/jvmti/AttachOnDemand/attach045/TestDescription.java 8202971 gener
|
||||
vmTestbase/nsk/jvmti/scenarios/jni_interception/JI05/ji05t001/TestDescription.java 8219652 aix-ppc64
|
||||
vmTestbase/nsk/jvmti/scenarios/jni_interception/JI06/ji06t001/TestDescription.java 8219652 aix-ppc64
|
||||
vmTestbase/nsk/jvmti/SetJNIFunctionTable/setjniftab001/TestDescription.java 8219652 aix-ppc64
|
||||
vmTestbase/nsk/jvmti/AttachOnDemand/attach002a/TestDescription.java 8277812 generic-all
|
||||
vmTestbase/nsk/jvmti/scenarios/capability/CM03/cm03t001/TestDescription.java 8073470 linux-all
|
||||
vmTestbase/nsk/jvmti/InterruptThread/intrpthrd003/TestDescription.java 8288911 macosx-x64
|
||||
|
||||
vmTestbase/nsk/jvmti/scenarios/sampling/SP04/sp04t001/TestDescription.java initial_run windows-x64
|
||||
vmTestbase/nsk/jvmti/scenarios/sampling/SP04/sp04t002/TestDescription.java initial_run windows-x64
|
||||
@@ -249,67 +259,21 @@ vmTestbase/jit/misctests/fpustack/GraphApplet.java linux-x64
|
||||
|
||||
vmTestbase/vm/mlvm/hiddenloader/stress/byteMutation/Test.java initial_run windows-all
|
||||
vmTestbase/vm/mlvm/indy/func/jvmti/redefineClassInBootstrap/TestDescription.java 8013267 generic-all
|
||||
vmTestbase/vm/mlvm/meth/stress/jdi/breakpointInCompiledCode/Test.java 8257761 generic-all
|
||||
vmTestbase/vm/mlvm/indy/func/jvmti/mergeCP_indy2none_a/TestDescription.java 8013267 generic-all
|
||||
vmTestbase/vm/mlvm/indy/func/jvmti/mergeCP_indy2manyDiff_b/TestDescription.java 8013267 generic-all
|
||||
vmTestbase/vm/mlvm/indy/func/jvmti/mergeCP_indy2manySame_b/TestDescription.java 8013267 generic-all
|
||||
vmTestbase/vm/mlvm/meth/stress/compiler/deoptimize/Test.java#id0 8269393 macosx-aarch64
|
||||
vmTestbase/vm/mlvm/meth/stress/compiler/deoptimize/Test.java#id0 initial_run macos-aarch64
|
||||
|
||||
vmTestbase/nsk/jdwp/ThreadReference/ForceEarlyReturn/forceEarlyReturn001/forceEarlyReturn001.java 7199837 generic-all
|
||||
|
||||
#############################################################################
|
||||
vmTestbase/nsk/stress/except/except012.java 8297977 generic-all
|
||||
vmTestbase/nsk/stress/strace/strace002.java 8288912 macosx-x64,windows-x64
|
||||
vmTestbase/nsk/stress/strace/strace003.java 8297824 macosx-x64,windows-x64
|
||||
vmTestbase/nsk/stress/strace/strace004.java 8297824 macosx-x64,windows-x64
|
||||
vmTestbase/nsk/monitoring/ThreadMXBean/ThreadInfo/Multi/Multi005/TestDescription.java 8076494 windows-x64
|
||||
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc1/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc10/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc11/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc12/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc13/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc14/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc15/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc16/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc17/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc18/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc19/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc2/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc20/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc21/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc22/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc23/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc24/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc25/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc26/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc27/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc28/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc29/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc3/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc30/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc31/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc32/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc33/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc34/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc35/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc36/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc37/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc38/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc39/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc4/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc40/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc41/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc42/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc43/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc44/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc45/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc46/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc47/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc48/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc49/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc5/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc50/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc51/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc52/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc6/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc7/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc8/TestDescription.java 8271615 macosx-all
|
||||
vmTestbase/vm/jit/LongTransitions/nativeFnc9/TestDescription.java 8271615 macosx-all
|
||||
### initial_runs
|
||||
|
||||
vmTestbase/nsk/stress/thread/thread008.java initial_run windows-all
|
||||
|
||||
@@ -317,8 +281,4 @@ vmTestbase/nsk/sysdict/vm/stress/btree/btree001/btree001.java initial_run window
|
||||
vmTestbase/nsk/sysdict/vm/stress/btree/btree005/btree005.java initial_run windows-aarch64
|
||||
vmTestbase/nsk/sysdict/vm/stress/btree/btree009/btree009.java initial_run windows-aarch64
|
||||
|
||||
resourcehogs/serviceability/sa/TestHeapDumpForLargeArray.java 8220624 generic-all
|
||||
|
||||
testlibrary_tests/ir_framework/tests/TestDTestAndExclude.java initial_run windows-all
|
||||
|
||||
jb/applications/ctw/plugins_cucumber_java_lib_cucumber_java.java JBR-6084 windows-all
|
||||
@@ -429,14 +429,10 @@ jfc_demo = \
|
||||
jdk_editpad = \
|
||||
jdk/editpad
|
||||
|
||||
jbr_all = \
|
||||
jb
|
||||
|
||||
jdk_desktop = \
|
||||
:jdk_desktop_part1 \
|
||||
:jdk_desktop_part2 \
|
||||
:jdk_desktop_part3 \
|
||||
:jbr_all
|
||||
:jdk_desktop_part3
|
||||
|
||||
jdk_desktop_part1 = \
|
||||
:jdk_client_sanity \
|
||||
|
||||
@@ -130,12 +130,14 @@ public class RowToleranceTransitivityTest {
|
||||
static void test() throws Exception {
|
||||
robot.delay(500);
|
||||
|
||||
clickOn(ft);
|
||||
|
||||
robot.delay(500);
|
||||
|
||||
if (KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner() != ft) {
|
||||
throw new RuntimeException("Cannot set initial focus");
|
||||
// Set focus on the first component to start traversal
|
||||
if (!setFocusOn(ft, new Runnable() {
|
||||
public void run() {
|
||||
clickOn(ft);
|
||||
}
|
||||
})) {
|
||||
System.out.println("Couldn't set focus on " + ft);
|
||||
throw new RuntimeException("Test couldn't be performed.");
|
||||
}
|
||||
|
||||
robot.delay(500);
|
||||
|
||||
@@ -34,43 +34,37 @@
|
||||
import java.awt.Frame;
|
||||
import java.awt.Robot;
|
||||
import java.awt.TextArea;
|
||||
import java.awt.AWTException;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
import test.java.awt.regtesthelpers.Util;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
public class TextAreaEditing {
|
||||
|
||||
final static Robot robot = Util.createRobot();
|
||||
private volatile int testFailCount = 0;
|
||||
private volatile boolean isTestFail = false;
|
||||
private final StringBuilder testFailMessage = new StringBuilder();
|
||||
private int testFailCount;
|
||||
private boolean isTestFail;
|
||||
private StringBuilder testFailMessage;
|
||||
|
||||
private Frame mainFrame = null;
|
||||
private TextArea textArea = null;
|
||||
private Frame mainFrame;
|
||||
private TextArea textArea;
|
||||
|
||||
private TextAreaEditing() throws InterruptedException, InvocationTargetException {
|
||||
SwingUtilities.invokeAndWait(() -> {
|
||||
mainFrame = new Frame();
|
||||
mainFrame.setSize(200, 200);
|
||||
private TextAreaEditing() {
|
||||
testFailMessage = new StringBuilder();
|
||||
mainFrame = new Frame();
|
||||
mainFrame.setSize(200, 200);
|
||||
|
||||
textArea = new TextArea();
|
||||
mainFrame.add(textArea);
|
||||
mainFrame.setVisible(true);
|
||||
});
|
||||
textArea = new TextArea();
|
||||
mainFrame.add(textArea);
|
||||
mainFrame.setVisible(true);
|
||||
}
|
||||
|
||||
private void dispose() throws InterruptedException, InvocationTargetException {
|
||||
SwingUtilities.invokeAndWait(() -> {
|
||||
if (mainFrame != null) {
|
||||
mainFrame.dispose();
|
||||
}
|
||||
});
|
||||
private void dispose() {
|
||||
if (mainFrame != null) {
|
||||
mainFrame.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] s) throws InterruptedException, InvocationTargetException {
|
||||
public static void main(String[] s) {
|
||||
TextAreaEditing textArea = new TextAreaEditing();
|
||||
textArea.testReplaceRange();
|
||||
textArea.testInsert();
|
||||
@@ -80,90 +74,79 @@ public class TextAreaEditing {
|
||||
textArea.dispose();
|
||||
}
|
||||
|
||||
private void testReplaceRange() throws InterruptedException, InvocationTargetException {
|
||||
SwingUtilities.invokeAndWait(() -> {
|
||||
textArea.setText(null);
|
||||
textArea.replaceRange("Replace", 0, 0);
|
||||
textArea.setText(null);
|
||||
checkTest("");
|
||||
private void testReplaceRange() {
|
||||
textArea.setText(null);
|
||||
textArea.replaceRange("Replace", 0, 0);
|
||||
textArea.setText(null);
|
||||
checkTest("");
|
||||
|
||||
textArea.setText("SetText");
|
||||
textArea.replaceRange("Replace", 0, 3);
|
||||
checkTest("ReplaceText");
|
||||
textArea.setText("SetText");
|
||||
textArea.replaceRange("Replace", 0, 3);
|
||||
checkTest("ReplaceText");
|
||||
|
||||
textArea.replaceRange("String", textArea.getText().length(),
|
||||
textArea.getText().length());
|
||||
checkTest("ReplaceTextString");
|
||||
textArea.replaceRange("String", textArea.getText().length(),
|
||||
textArea.getText().length());
|
||||
checkTest("ReplaceTextString");
|
||||
|
||||
textArea.replaceRange("String", 0, 0);
|
||||
checkTest("StringReplaceTextString");
|
||||
textArea.replaceRange("String", 0, 0);
|
||||
checkTest("StringReplaceTextString");
|
||||
|
||||
textArea.replaceRange("replaceRange", 0, textArea.getText().length());
|
||||
checkTest("replaceRange");
|
||||
});
|
||||
textArea.replaceRange("replaceRange", 0, textArea.getText().length());
|
||||
checkTest("replaceRange");
|
||||
}
|
||||
|
||||
private void testInsert() throws InterruptedException, InvocationTargetException {
|
||||
SwingUtilities.invokeAndWait(() -> {
|
||||
textArea.setText(null);
|
||||
textArea.insert("Insert", 0);
|
||||
textArea.setText("");
|
||||
checkTest("");
|
||||
private void testInsert() {
|
||||
textArea.setText(null);
|
||||
textArea.insert("Insert", 0);
|
||||
textArea.setText("");
|
||||
checkTest("");
|
||||
|
||||
textArea.setText("SetText");
|
||||
textArea.insert("Insert", 3);
|
||||
checkTest("SetInsertText");
|
||||
textArea.setText("SetText");
|
||||
textArea.insert("Insert", 3);
|
||||
checkTest("SetInsertText");
|
||||
|
||||
textArea.insert("Insert", 0);
|
||||
checkTest("InsertSetInsertText");
|
||||
textArea.insert("Insert", 0);
|
||||
checkTest("InsertSetInsertText");
|
||||
|
||||
textArea.insert("Insert", textArea.getText().length());
|
||||
checkTest("InsertSetInsertTextInsert");
|
||||
});
|
||||
textArea.insert("Insert", textArea.getText().length());
|
||||
checkTest("InsertSetInsertTextInsert");
|
||||
}
|
||||
|
||||
private void testAppend() throws InterruptedException, InvocationTargetException {
|
||||
SwingUtilities.invokeAndWait(() -> {
|
||||
textArea.setText(null);
|
||||
textArea.append("Append");
|
||||
textArea.setText(null);
|
||||
checkTest("");
|
||||
private void testAppend() {
|
||||
textArea.setText(null);
|
||||
textArea.append("Append");
|
||||
textArea.setText(null);
|
||||
checkTest("");
|
||||
|
||||
textArea.setText("SetText");
|
||||
textArea.append("Append");
|
||||
checkTest("SetTextAppend");
|
||||
textArea.setText("SetText");
|
||||
textArea.append("Append");
|
||||
checkTest("SetTextAppend");
|
||||
|
||||
textArea.append("");
|
||||
checkTest("SetTextAppend");
|
||||
textArea.setText("");
|
||||
checkTest("");
|
||||
});
|
||||
textArea.append("");
|
||||
checkTest("SetTextAppend");
|
||||
textArea.setText("");
|
||||
checkTest("");
|
||||
}
|
||||
|
||||
private void testSetText() throws InterruptedException, InvocationTargetException {
|
||||
SwingUtilities.invokeAndWait(() -> {
|
||||
textArea.setText(null);
|
||||
textArea.requestFocus();
|
||||
});
|
||||
private void testSetText() {
|
||||
textArea.setText(null);
|
||||
textArea.requestFocus();
|
||||
Util.clickOnComp(textArea, robot);
|
||||
Util.waitForIdle(robot);
|
||||
robot.keyPress(KeyEvent.VK_A);
|
||||
robot.delay(5);
|
||||
robot.keyRelease(KeyEvent.VK_A);
|
||||
Util.waitForIdle(robot);
|
||||
SwingUtilities.invokeAndWait(() -> {
|
||||
textArea.setText(null);
|
||||
checkTest("");
|
||||
textArea.setText("CaseSensitive");
|
||||
checkTest("CaseSensitive");
|
||||
textArea.setText("caseSensitive");
|
||||
checkTest("caseSensitive");
|
||||
});
|
||||
textArea.setText(null);
|
||||
checkTest("");
|
||||
textArea.setText("CaseSensitive");
|
||||
checkTest("CaseSensitive");
|
||||
textArea.setText("caseSensitive");
|
||||
checkTest("caseSensitive");
|
||||
|
||||
}
|
||||
|
||||
private void checkTest(String str) {
|
||||
assert SwingUtilities.isEventDispatchThread();
|
||||
|
||||
if (str != null && !str.equals(textArea.getText())) {
|
||||
testFailMessage.append("TestFail line : ");
|
||||
testFailMessage.append(Thread.currentThread().getStackTrace()[2].
|
||||
@@ -178,7 +161,7 @@ public class TextAreaEditing {
|
||||
}
|
||||
}
|
||||
|
||||
private void checkFailures() throws InterruptedException, InvocationTargetException {
|
||||
private void checkFailures() {
|
||||
if (isTestFail) {
|
||||
testFailMessage.insert(0, "Test Fail count : " + testFailCount
|
||||
+ System.getProperty("line.separator"));
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2023, JetBrains s.r.o.. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -179,8 +178,6 @@ public class GrabTest {
|
||||
f1.setVisible(true);
|
||||
Util.waitForIdle(robot);
|
||||
Util.clickOnTitle(f1, robot);
|
||||
robot.delay(100);
|
||||
Util.waitForIdle(robot);
|
||||
if (!ungrabbed) {
|
||||
passed = false;
|
||||
System.err.println("Failure: [5] Press inside of other Frame's title didn't cause ungrab");
|
||||
|
||||
@@ -1,86 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2023, JetBrains s.r.o.. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @summary Test for VoiceOver-specific issues of JComboBox
|
||||
* @author dmitry.drobotov@jetbrains.com
|
||||
* @run main/manual AccessibleJComboBoxVoiceOverTest
|
||||
* @requires (os.family == "mac")
|
||||
*/
|
||||
|
||||
import javax.swing.JComboBox;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.SwingUtilities;
|
||||
import java.awt.FlowLayout;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
|
||||
public class AccessibleJComboBoxVoiceOverTest extends AccessibleComponentTest {
|
||||
|
||||
@java.lang.Override
|
||||
public CountDownLatch createCountDownLatch() {
|
||||
return new CountDownLatch(1);
|
||||
}
|
||||
|
||||
void createCombobox() {
|
||||
INSTRUCTIONS = """
|
||||
INSTRUCTIONS:
|
||||
Check VoiceOver-specific issues of JComboBox.
|
||||
|
||||
Turn VoiceOver on, and Tab to the combo box.
|
||||
|
||||
Use VO+Space shortcut to open the combo box and select a new item.
|
||||
Move keyboard focus away from the combo box using Shift+Tab and then back to the combo box by Tab.
|
||||
Repeat the same step with VoiceOver cursor navigation using VO+Left and VO+Right.
|
||||
|
||||
If in both cases VoiceOver reads the newly selected value, press PASS, otherwise press FAIL.""";
|
||||
|
||||
JPanel frame = new JPanel();
|
||||
|
||||
String[] NAMES = {"One", "Two", "Three", "Four", "Five"};
|
||||
JComboBox<String> combo = new JComboBox<>(NAMES);
|
||||
|
||||
JLabel label = new JLabel("This is combobox:");
|
||||
label.setLabelFor(combo);
|
||||
|
||||
frame.setLayout(new FlowLayout());
|
||||
frame.add(label);
|
||||
frame.add(combo);
|
||||
exceptionString = "AccessibleJComboBoxVoiceOver test failed!";
|
||||
super.createUI(frame, "AccessibleJComboBoxVoiceOverTest");
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
AccessibleJComboBoxVoiceOverTest test = new AccessibleJComboBoxVoiceOverTest();
|
||||
|
||||
countDownLatch = test.createCountDownLatch();
|
||||
SwingUtilities.invokeLater(test::createCombobox);
|
||||
countDownLatch.await();
|
||||
|
||||
if (!testResult) {
|
||||
throw new RuntimeException(a11yTest.exceptionString);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,145 +22,24 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
import sun.awt.wl.WLRobotPeer;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.KeyAdapter;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.awt.event.KeyListener;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static java.awt.event.KeyEvent.*;
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @key headful
|
||||
* @summary JBR-5676 Wayland: support generation of input events by AWT Robot in weston plugin
|
||||
* @modules java.desktop/sun.awt.wl
|
||||
* @requires (os.family == "linux")
|
||||
* @library /test/lib
|
||||
* @build RobotKeyboard
|
||||
* @run driver/timeout=600 WakefieldTestDriver -timeout 600 RobotKeyboard
|
||||
* @run driver WakefieldTestDriver -timeout 60 RobotKeyboard
|
||||
*/
|
||||
|
||||
public class RobotKeyboard {
|
||||
private record Compose(String dead, String key, String result) {
|
||||
}
|
||||
|
||||
private static class Keys {
|
||||
final static String DEAD_ABOVERING = "°";
|
||||
final static String DEAD_DOUBLEACUTE = "˝";
|
||||
final static String DEAD_MACRON = "¯";
|
||||
final static String DEAD_CEDILLA = "¸";
|
||||
final static String DEAD_CIRCUMFLEX = "^";
|
||||
final static String DEAD_HORN = "\u031b";
|
||||
final static String DEAD_OGONEK = "˛";
|
||||
final static String DEAD_BREVE = "˘";
|
||||
final static String DEAD_ABOVEDOT = "˙";
|
||||
final static String DEAD_CARON = "ˇ";
|
||||
final static String DEAD_HOOK = "\u0309";
|
||||
final static String DEAD_BELOWDOT = "\u0323";
|
||||
final static String DEAD_ACUTE = "'";
|
||||
final static String DEAD_DIAERESIS = "\"";
|
||||
final static String DEAD_GRAVE = "`";
|
||||
final static String DEAD_TILDE = "~";
|
||||
final static String DEAD_BELOWMACRON = "\u0331";
|
||||
|
||||
|
||||
final static Compose[] composeSamples = new Compose[]{
|
||||
new Compose(DEAD_ABOVERING, " ", DEAD_ABOVERING),
|
||||
new Compose(DEAD_ABOVERING, "a", "å"),
|
||||
new Compose(DEAD_ABOVERING, "A", "Å"),
|
||||
new Compose(DEAD_ABOVERING, "b", null),
|
||||
new Compose(DEAD_DOUBLEACUTE, " ", DEAD_DOUBLEACUTE),
|
||||
new Compose(DEAD_DOUBLEACUTE, "o", "ő"),
|
||||
new Compose(DEAD_DOUBLEACUTE, "O", "Ő"),
|
||||
new Compose(DEAD_DOUBLEACUTE, "a", null),
|
||||
new Compose(DEAD_MACRON, " ", DEAD_MACRON),
|
||||
new Compose(DEAD_MACRON, "a", "ā"),
|
||||
new Compose(DEAD_MACRON, "A", "Ā"),
|
||||
new Compose(DEAD_MACRON, "и", "ӣ"),
|
||||
new Compose(DEAD_MACRON, "И", "Ӣ"),
|
||||
new Compose(DEAD_MACRON, "b", null),
|
||||
new Compose(DEAD_MACRON, "ы", null),
|
||||
new Compose(DEAD_CEDILLA, " ", DEAD_CEDILLA),
|
||||
new Compose(DEAD_CEDILLA, "c", "ç"),
|
||||
new Compose(DEAD_CEDILLA, "C", "Ç"),
|
||||
new Compose(DEAD_CEDILLA, "a", null),
|
||||
new Compose(DEAD_CIRCUMFLEX, " ", DEAD_CIRCUMFLEX),
|
||||
new Compose(DEAD_CIRCUMFLEX, "a", "â"),
|
||||
new Compose(DEAD_CIRCUMFLEX, "A", "Â"),
|
||||
new Compose(DEAD_CIRCUMFLEX, "3", "³"),
|
||||
new Compose(DEAD_CIRCUMFLEX, "и", "и̂"),
|
||||
new Compose(DEAD_CIRCUMFLEX, "И", "И̂"),
|
||||
new Compose(DEAD_CIRCUMFLEX, "b", null),
|
||||
new Compose(DEAD_CIRCUMFLEX, "ы", null),
|
||||
new Compose(DEAD_HORN, " ", DEAD_HORN),
|
||||
new Compose(DEAD_HORN, "u", "ư"),
|
||||
new Compose(DEAD_HORN, "U", "Ư"),
|
||||
new Compose(DEAD_HORN, "a", null),
|
||||
new Compose(DEAD_OGONEK, " ", DEAD_OGONEK),
|
||||
new Compose(DEAD_OGONEK, "a", "ą"),
|
||||
new Compose(DEAD_OGONEK, "A", "Ą"),
|
||||
new Compose(DEAD_OGONEK, "b", null),
|
||||
new Compose(DEAD_BREVE, " ", DEAD_BREVE),
|
||||
new Compose(DEAD_BREVE, "a", "ă"),
|
||||
new Compose(DEAD_BREVE, "A", "Ă"),
|
||||
new Compose(DEAD_BREVE, "b", null),
|
||||
new Compose(DEAD_ABOVEDOT, " ", DEAD_ABOVEDOT),
|
||||
new Compose(DEAD_ABOVEDOT, "a", "ȧ"),
|
||||
new Compose(DEAD_ABOVEDOT, "A", "Ȧ"),
|
||||
new Compose(DEAD_ABOVEDOT, "u", null),
|
||||
new Compose(DEAD_CARON, " ", DEAD_CARON),
|
||||
new Compose(DEAD_CARON, "a", "ǎ"),
|
||||
new Compose(DEAD_CARON, "A", "Ǎ"),
|
||||
new Compose(DEAD_CARON, "b", null),
|
||||
new Compose(DEAD_HOOK, " ", DEAD_HOOK),
|
||||
new Compose(DEAD_HOOK, "a", "ả"),
|
||||
new Compose(DEAD_HOOK, "A", "Ả"),
|
||||
new Compose(DEAD_HOOK, ";", null),
|
||||
new Compose(DEAD_BELOWDOT, " ", DEAD_BELOWDOT),
|
||||
new Compose(DEAD_BELOWDOT, "a", "ạ"),
|
||||
new Compose(DEAD_BELOWDOT, "A", "Ạ"),
|
||||
new Compose(DEAD_BELOWDOT, "c", null),
|
||||
new Compose(DEAD_ACUTE, " ", DEAD_ACUTE),
|
||||
new Compose(DEAD_ACUTE, "a", "á"),
|
||||
new Compose(DEAD_ACUTE, "A", "Á"),
|
||||
new Compose(DEAD_ACUTE, "г", "ѓ"),
|
||||
new Compose(DEAD_ACUTE, "Г", "Ѓ"),
|
||||
new Compose(DEAD_ACUTE, "b", null),
|
||||
new Compose(DEAD_ACUTE, "ы", null),
|
||||
new Compose(DEAD_DIAERESIS, " ", DEAD_DIAERESIS),
|
||||
new Compose(DEAD_DIAERESIS, "a", "ä"),
|
||||
new Compose(DEAD_DIAERESIS, "A", "Ä"),
|
||||
new Compose(DEAD_DIAERESIS, "b", null),
|
||||
new Compose(DEAD_GRAVE, " ", DEAD_GRAVE),
|
||||
new Compose(DEAD_GRAVE, "a", "à"),
|
||||
new Compose(DEAD_GRAVE, "A", "À"),
|
||||
new Compose(DEAD_GRAVE, "и", "ѝ"),
|
||||
new Compose(DEAD_GRAVE, "И", "Ѝ"),
|
||||
new Compose(DEAD_GRAVE, "b", null),
|
||||
new Compose(DEAD_GRAVE, "ы", null),
|
||||
new Compose(DEAD_TILDE, " ", DEAD_TILDE),
|
||||
new Compose(DEAD_TILDE, "a", "ã"),
|
||||
new Compose(DEAD_TILDE, "A", "Ã"),
|
||||
new Compose(DEAD_TILDE, "b", null),
|
||||
// No DEAD_BELOWMACRON + Space
|
||||
new Compose(DEAD_BELOWMACRON, "b", "ḇ"),
|
||||
new Compose(DEAD_BELOWMACRON, "B", "Ḇ"),
|
||||
new Compose(DEAD_BELOWMACRON, "a", null),
|
||||
};
|
||||
}
|
||||
|
||||
private static List<Integer> varyingKeys = List.of(
|
||||
VK_0, VK_1, VK_2, VK_3, VK_4, VK_5, VK_6, VK_7, VK_8, VK_9,
|
||||
VK_A, VK_B, VK_C, VK_D, VK_E, VK_F, VK_G, VK_H, VK_I, VK_J,
|
||||
VK_K, VK_L, VK_M, VK_N, VK_O, VK_P, VK_Q, VK_R, VK_S, VK_T,
|
||||
VK_U, VK_V, VK_W, VK_X, VK_Y, VK_Z, VK_COMMA, VK_PERIOD,
|
||||
VK_SLASH, VK_LESS, VK_MINUS, VK_EQUALS, VK_OPEN_BRACKET,
|
||||
VK_CLOSE_BRACKET, VK_SEMICOLON, VK_QUOTE, VK_BACK_QUOTE, VK_BACK_SLASH);
|
||||
|
||||
private static String ordinaryKeyNames[] = {
|
||||
"VK_0",
|
||||
"VK_1",
|
||||
@@ -209,18 +88,19 @@ public class RobotKeyboard {
|
||||
"VK_F10",
|
||||
"VK_F11",
|
||||
"VK_F12",
|
||||
"VK_F13",
|
||||
"VK_F14",
|
||||
"VK_F15",
|
||||
"VK_F16",
|
||||
"VK_F17",
|
||||
"VK_F18",
|
||||
"VK_F19",
|
||||
"VK_F20",
|
||||
"VK_F21",
|
||||
"VK_F22",
|
||||
"VK_F23",
|
||||
"VK_F24",
|
||||
// TODO: WLToolkit ignores F13..F24 due to the XKB issues presumably
|
||||
// "VK_F13",
|
||||
// "VK_F14",
|
||||
// "VK_F15",
|
||||
// "VK_F16",
|
||||
// "VK_F17",
|
||||
// "VK_F18",
|
||||
// "VK_F19",
|
||||
// "VK_F20",
|
||||
// "VK_F21",
|
||||
// "VK_F22",
|
||||
// "VK_F23",
|
||||
// "VK_F24",
|
||||
"VK_FIND",
|
||||
"VK_G",
|
||||
"VK_H",
|
||||
@@ -272,8 +152,7 @@ public class RobotKeyboard {
|
||||
"VK_SHIFT",
|
||||
"VK_SLASH",
|
||||
"VK_SPACE",
|
||||
// TODO: WLToolkit reports VK_STOP as VK_CANCEL
|
||||
// "VK_STOP",
|
||||
"VK_STOP",
|
||||
"VK_SUBTRACT",
|
||||
"VK_T",
|
||||
"VK_TAB",
|
||||
@@ -296,79 +175,68 @@ public class RobotKeyboard {
|
||||
|
||||
private static Robot robot;
|
||||
private static JFrame frame;
|
||||
private static JTextArea infoTextArea;
|
||||
private static JTextArea eventsTextArea;
|
||||
private static JTextArea typedTextArea;
|
||||
private static JTextArea textArea;
|
||||
private static final List<KeyEvent> events = new ArrayList<>();
|
||||
private static String typed = "";
|
||||
private static final StringBuffer stringLog = new StringBuffer();
|
||||
private static final StringBuffer pendingLog = new StringBuffer();
|
||||
private static XKBLayoutData.LayoutDescriptor curLayout;
|
||||
private static XKBLayoutData.LayoutDescriptor curKeyCodeLayout;
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
SwingUtilities.invokeAndWait(() -> {
|
||||
frame = new JFrame("Robot Keyboard Test");
|
||||
frame = new JFrame("test");
|
||||
|
||||
frame.setLayout(new FlowLayout());
|
||||
|
||||
infoTextArea = new JTextArea("", 30, 30);
|
||||
infoTextArea.setEditable(false);
|
||||
frame.add(new JScrollPane(infoTextArea));
|
||||
eventsTextArea = new JTextArea("", 30, 30);
|
||||
eventsTextArea.setEditable(false);
|
||||
frame.add(new JScrollPane(eventsTextArea));
|
||||
typedTextArea = new JTextArea("", 30, 30);
|
||||
frame.add(new JScrollPane(typedTextArea));
|
||||
|
||||
frame.pack();
|
||||
textArea = new JTextArea("");
|
||||
textArea.setEditable(false);
|
||||
frame.add(new JScrollPane(textArea));
|
||||
frame.setSize(500, 500);
|
||||
frame.setVisible(true);
|
||||
|
||||
typedTextArea.addKeyListener(
|
||||
new KeyListener() {
|
||||
KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(
|
||||
new KeyEventDispatcher() {
|
||||
@Override
|
||||
public void keyTyped(KeyEvent e) {
|
||||
typed = typed + e.getKeyChar();
|
||||
pendingLog.append("\ttyped: U+" + String.format("%04X", (int) e.getKeyChar()) + "\n");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void keyPressed(KeyEvent e) {
|
||||
eventsTextArea.append("press: " + getKeyText(e.getKeyCode()) + "\n");
|
||||
eventsTextArea.setCaretPosition(eventsTextArea.getDocument().getLength());
|
||||
events.add(e);
|
||||
pendingLog.append("\tpress: " + getKeyText(e.getKeyCode()) + "\n");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void keyReleased(KeyEvent e) {
|
||||
eventsTextArea.append("release: " + getKeyText(e.getKeyCode()) + "\n");
|
||||
eventsTextArea.setCaretPosition(eventsTextArea.getDocument().getLength());
|
||||
events.add(e);
|
||||
pendingLog.append("\trelease: " + getKeyText(e.getKeyCode()) + "\n");
|
||||
public boolean dispatchKeyEvent(KeyEvent e) {
|
||||
if (e.getID() == KeyEvent.KEY_PRESSED || e.getID() == KeyEvent.KEY_RELEASED) {
|
||||
events.add(e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
robot = new Robot();
|
||||
robot.setAutoDelay(10);
|
||||
typedTextArea.requestFocusInWindow();
|
||||
robot.setAutoDelay(50);
|
||||
robot.delay(500);
|
||||
|
||||
if (Toolkit.getDefaultToolkit().getLockingKeyState(KeyEvent.VK_CAPS_LOCK)) {
|
||||
// Disable caps lock
|
||||
robot.keyPress(KeyEvent.VK_CAPS_LOCK);
|
||||
robot.keyRelease(KeyEvent.VK_CAPS_LOCK);
|
||||
}
|
||||
|
||||
if (!Toolkit.getDefaultToolkit().getLockingKeyState(KeyEvent.VK_NUM_LOCK)) {
|
||||
// Enable num lock
|
||||
robot.keyPress(KeyEvent.VK_NUM_LOCK);
|
||||
robot.keyRelease(KeyEvent.VK_NUM_LOCK);
|
||||
}
|
||||
|
||||
boolean ok = true;
|
||||
|
||||
for (var layout : XKBLayoutData.layouts) {
|
||||
if (!runTest(layout)) {
|
||||
ok = false;
|
||||
break;
|
||||
}
|
||||
for (String key : ordinaryKeyNames) {
|
||||
ok &= processKey(key);
|
||||
}
|
||||
|
||||
for (String key : lockingKeyNames) {
|
||||
ok &= processKey(key);
|
||||
|
||||
// reset the locking state to the previous one
|
||||
int keyCode = getKeyCodeByName(key);
|
||||
robot.keyPress(keyCode);
|
||||
robot.keyRelease(keyCode);
|
||||
robot.waitForIdle();
|
||||
}
|
||||
|
||||
System.err.println("===== TEST RESULT =====");
|
||||
System.err.println(ok ? "TEST PASSED" : "TEST FAILED");
|
||||
System.err.println("===== FULL TEST LOG =====");
|
||||
System.err.println(stringLog.toString());
|
||||
System.err.println("===== FULL LOG =====");
|
||||
System.err.println(textArea.getText());
|
||||
|
||||
frame.dispose();
|
||||
|
||||
@@ -377,55 +245,6 @@ public class RobotKeyboard {
|
||||
System.exit(ok ? 0 : 1);
|
||||
}
|
||||
|
||||
static void keyPress(int keyCode) {
|
||||
pendingLog.append("\tRobot keyPress: " + getKeyText(keyCode) + "\n");
|
||||
robot.keyPress(keyCode);
|
||||
}
|
||||
|
||||
static void keyRelease(int keyCode) {
|
||||
pendingLog.append("\tRobot keyRelease: " + getKeyText(keyCode) + "\n");
|
||||
robot.keyRelease(keyCode);
|
||||
}
|
||||
|
||||
static boolean runTest(XKBLayoutData.LayoutDescriptor layout) {
|
||||
curLayout = layout;
|
||||
if (layout.asciiCapable()) {
|
||||
curKeyCodeLayout = curLayout;
|
||||
} else {
|
||||
curKeyCodeLayout = XKBLayoutData.layouts.get(0); // US
|
||||
}
|
||||
|
||||
infoTextArea.setText("");
|
||||
log("Layout: " + layout.layout() + ", variant: " + layout.variant() + "\n");
|
||||
frame.setTitle(layout.fullName());
|
||||
WLRobotPeer.setXKBLayout(layout.layout(), layout.variant(), "lv3:ralt_switch");
|
||||
robot.delay(500);
|
||||
|
||||
if (Toolkit.getDefaultToolkit().getLockingKeyState(VK_CAPS_LOCK)) {
|
||||
// Disable caps lock
|
||||
robot.keyPress(VK_CAPS_LOCK);
|
||||
robot.keyRelease(VK_CAPS_LOCK);
|
||||
}
|
||||
|
||||
if (!Toolkit.getDefaultToolkit().getLockingKeyState(VK_NUM_LOCK)) {
|
||||
// Enable num lock
|
||||
robot.keyPress(VK_NUM_LOCK);
|
||||
robot.keyRelease(VK_NUM_LOCK);
|
||||
}
|
||||
|
||||
robot.delay(500);
|
||||
|
||||
boolean ok = true;
|
||||
|
||||
for (int key : varyingKeys) {
|
||||
ok &= processKey(key);
|
||||
}
|
||||
|
||||
robot.delay(100);
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
private static int getKeyCodeByName(String name) {
|
||||
try {
|
||||
return KeyEvent.class.getDeclaredField(name).getInt(KeyEvent.class);
|
||||
@@ -434,166 +253,47 @@ public class RobotKeyboard {
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean typeChar(String what) {
|
||||
for (var desc : curLayout.keys().values()) {
|
||||
for (int level = 0; level < desc.levels().size(); ++level) {
|
||||
var sym = desc.levels().get(level);
|
||||
if ((sym.xkbMods() & 0x81) != sym.xkbMods()) {
|
||||
// we don't understand those mods
|
||||
continue;
|
||||
}
|
||||
if (!sym.isDead() && sym.value().equals(what)) {
|
||||
var keys = xkbModsToRobotKeycodes(sym.xkbMods());
|
||||
keys.add(desc.robotCode());
|
||||
for (var key : keys) {
|
||||
keyPress(key);
|
||||
}
|
||||
for (var key : keys.reversed()) {
|
||||
keyRelease(key);
|
||||
}
|
||||
robot.waitForIdle();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private static List<Integer> xkbModsToRobotKeycodes(int xkbMods) {
|
||||
var result = new ArrayList<Integer>();
|
||||
if ((xkbMods & 0x01) != 0) {
|
||||
result.add(VK_SHIFT);
|
||||
}
|
||||
if ((xkbMods & 0x80) != 0) {
|
||||
result.add(VK_ALT_GRAPH);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private static void checkKey(int keyCode, int level, XKBLayoutData.KeyDescriptor desc, Compose compose) {
|
||||
var sym = desc.levels().get(level);
|
||||
private static void checkKey(String name) {
|
||||
int keyCode = getKeyCodeByName(name);
|
||||
events.clear();
|
||||
typedTextArea.requestFocusInWindow();
|
||||
typed = "";
|
||||
textArea.grabFocus();
|
||||
robot.waitForIdle();
|
||||
robot.keyPress(keyCode);
|
||||
robot.keyRelease(keyCode);
|
||||
robot.waitForIdle();
|
||||
|
||||
var mods = xkbModsToRobotKeycodes(sym.xkbMods());
|
||||
for (var mod : mods) {
|
||||
keyPress(mod);
|
||||
log(getKeyText(mod) + " + ");
|
||||
}
|
||||
log(getKeyText(keyCode));
|
||||
if (compose != null) {
|
||||
log(", compose ");
|
||||
log(compose.key);
|
||||
}
|
||||
log(": ");
|
||||
keyPress(keyCode);
|
||||
keyRelease(keyCode);
|
||||
for (var mod : mods.reversed()) {
|
||||
keyRelease(mod);
|
||||
}
|
||||
robot.waitForIdle();
|
||||
|
||||
List<KeyEvent> cleanEvents = new ArrayList<>();
|
||||
|
||||
for (KeyEvent e : events) {
|
||||
if (mods.contains(e.getKeyCode())) continue;
|
||||
if (e.getKeyCode() == VK_ALT && mods.contains(VK_ALT_GRAPH)) continue;
|
||||
cleanEvents.add(e);
|
||||
}
|
||||
|
||||
if (cleanEvents.size() != 2) {
|
||||
if (events.size() != 2) {
|
||||
throw new RuntimeException("Expected two events, got: " + events.size());
|
||||
}
|
||||
|
||||
if (cleanEvents.get(0).getID() != KeyEvent.KEY_PRESSED || cleanEvents.get(1).getID() != KeyEvent.KEY_RELEASED) {
|
||||
if (events.get(0).getID() != KeyEvent.KEY_PRESSED || events.get(1).getID() != KeyEvent.KEY_RELEASED) {
|
||||
throw new RuntimeException("Expected one KEY_PRESSED and one KEY_RELEASED");
|
||||
}
|
||||
|
||||
int expectedKeyCode = curKeyCodeLayout.keys().get(keyCode).javaKeyCode();
|
||||
|
||||
if (cleanEvents.get(0).getKeyCode() != expectedKeyCode) {
|
||||
throw new RuntimeException("KEY_PRESSED keyCode = " + cleanEvents.get(0).getKeyCode() + ", expected " + expectedKeyCode);
|
||||
if (events.get(0).getKeyCode() != keyCode) {
|
||||
throw new RuntimeException("KEY_PRESSED keyCode is " + events.get(0).getKeyCode() + ", expected " + keyCode);
|
||||
}
|
||||
|
||||
if (cleanEvents.get(1).getKeyCode() != expectedKeyCode) {
|
||||
throw new RuntimeException("KEY_RELEASED keyCode = " + cleanEvents.get(1).getKeyCode() + ", expected " + expectedKeyCode);
|
||||
if (events.get(1).getKeyCode() != keyCode) {
|
||||
throw new RuntimeException("KEY_RELEASED keyCode is " + events.get(1).getKeyCode() + ", expected " + keyCode);
|
||||
}
|
||||
|
||||
String value = sym.value();
|
||||
|
||||
if (sym.isDead()) {
|
||||
if (!typeChar(compose.key)) {
|
||||
keyPress(VK_ESCAPE);
|
||||
keyRelease(VK_ESCAPE);
|
||||
robot.waitForIdle();
|
||||
log("(skipped)\n");
|
||||
return;
|
||||
}
|
||||
value = compose.result == null ? "" : compose.result;
|
||||
}
|
||||
|
||||
if (!typed.equals(value)) {
|
||||
throw new RuntimeException("KEY_TYPED: expected '" + value + "', got '" + typed + "'");
|
||||
}
|
||||
|
||||
log("OK\n");
|
||||
}
|
||||
|
||||
private static void log(String what) {
|
||||
infoTextArea.append(what);
|
||||
infoTextArea.setCaretPosition(infoTextArea.getDocument().getLength());
|
||||
stringLog.append(what);
|
||||
textArea.append(what);
|
||||
textArea.setCaretPosition(textArea.getDocument().getLength());
|
||||
System.err.print(what);
|
||||
}
|
||||
|
||||
private static boolean processKey(int keyCode) {
|
||||
var desc = curLayout.keys().get(keyCode);
|
||||
int maxLevel = desc.levels().size();
|
||||
if (maxLevel > 2 && curLayout.layout().equals("us") && curLayout.variant().equals("")) {
|
||||
// Fix for the 102nd key, which for some reason has 4 levels even though AltGr is not supported?
|
||||
maxLevel = 2;
|
||||
private static boolean processKey(String name) {
|
||||
log(name + ": ");
|
||||
try {
|
||||
checkKey(name);
|
||||
log("OK\n");
|
||||
return true;
|
||||
} catch (RuntimeException e) {
|
||||
log(e.getMessage() + "\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
boolean ok = true;
|
||||
for (int level = 0; level < maxLevel; ++level) {
|
||||
typedTextArea.append(getKeyText(keyCode) + ", level " + level + ": ");
|
||||
typedTextArea.setCaretPosition(typedTextArea.getDocument().getLength());
|
||||
var sym = desc.levels().get(level);
|
||||
if ((sym.xkbMods() & 0x81) != sym.xkbMods()) {
|
||||
// we don't understand those mods, so the test won't work
|
||||
continue;
|
||||
}
|
||||
|
||||
List<Compose> composes = new ArrayList<>();
|
||||
if (sym.isDead()) {
|
||||
for (Compose c : Keys.composeSamples) {
|
||||
if (c.dead.equals(sym.value())) {
|
||||
composes.add(c);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
composes.add(null);
|
||||
}
|
||||
|
||||
for (Compose compose : composes) {
|
||||
try {
|
||||
checkKey(keyCode, level, desc, compose);
|
||||
} catch (RuntimeException e) {
|
||||
log(e.getMessage());
|
||||
log("\n");
|
||||
ok = false;
|
||||
}
|
||||
if (!pendingLog.isEmpty()) {
|
||||
stringLog.append(pendingLog);
|
||||
pendingLog.setLength(0);
|
||||
}
|
||||
}
|
||||
|
||||
typedTextArea.append("\n");
|
||||
typedTextArea.setCaretPosition(typedTextArea.getDocument().getLength());
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,6 @@
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
import jdk.test.lib.process.ProcessTools;
|
||||
import jdk.test.lib.process.OutputAnalyzer;
|
||||
import java.util.List;
|
||||
@@ -62,7 +61,6 @@ public class WakefieldTestDriver {
|
||||
final List<String> jvmArgs = new ArrayList<String>();
|
||||
jvmArgs.add("-Dawt.toolkit.name=WLToolkit");
|
||||
jvmArgs.add("-Xcheck:jni");
|
||||
jvmArgs.add("--add-exports=java.desktop/sun.awt.wl=ALL-UNNAMED");
|
||||
|
||||
int nScreens = DEFAULT_NUMBER_OF_SCREENS;
|
||||
int screenWidth = DEFAULT_SCREEN_WIDTH;
|
||||
|
||||
@@ -1,962 +0,0 @@
|
||||
/*
|
||||
* Copyright 2023 JetBrains s.r.o.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
import java.util.*;
|
||||
import java.awt.event.KeyEvent;
|
||||
|
||||
public class XKBLayoutData {
|
||||
public record KeySymDescriptor(String value, boolean isDead, int xkbMods) {
|
||||
}
|
||||
|
||||
public record KeyDescriptor(int robotCode, int javaKeyCode, int javaKeyCodeUndead, List<KeySymDescriptor> levels) {
|
||||
}
|
||||
|
||||
public record LayoutDescriptor(String layout, String variant, String fullName, boolean asciiCapable,
|
||||
Map<Integer, KeyDescriptor> keys) {
|
||||
}
|
||||
|
||||
public static final List<LayoutDescriptor> layouts;
|
||||
|
||||
static {
|
||||
layouts = new ArrayList<>();
|
||||
{
|
||||
var layout = new LayoutDescriptor("us", "", "English (US)", true, new HashMap<>());
|
||||
layout.keys.put(KeyEvent.VK_ESCAPE, new KeyDescriptor(KeyEvent.VK_ESCAPE, KeyEvent.VK_ESCAPE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u001b", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_1, new KeyDescriptor(KeyEvent.VK_1, KeyEvent.VK_1, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("1", false, 0), new KeySymDescriptor("!", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_2, new KeyDescriptor(KeyEvent.VK_2, KeyEvent.VK_2, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("2", false, 0), new KeySymDescriptor("@", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_3, new KeyDescriptor(KeyEvent.VK_3, KeyEvent.VK_3, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("3", false, 0), new KeySymDescriptor("#", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_4, new KeyDescriptor(KeyEvent.VK_4, KeyEvent.VK_4, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("4", false, 0), new KeySymDescriptor("$", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_5, new KeyDescriptor(KeyEvent.VK_5, KeyEvent.VK_5, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("5", false, 0), new KeySymDescriptor("%", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_6, new KeyDescriptor(KeyEvent.VK_6, KeyEvent.VK_6, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("6", false, 0), new KeySymDescriptor("^", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_7, new KeyDescriptor(KeyEvent.VK_7, KeyEvent.VK_7, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("7", false, 0), new KeySymDescriptor("&", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_8, new KeyDescriptor(KeyEvent.VK_8, KeyEvent.VK_8, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("8", false, 0), new KeySymDescriptor("*", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_9, new KeyDescriptor(KeyEvent.VK_9, KeyEvent.VK_9, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("9", false, 0), new KeySymDescriptor("(", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_0, new KeyDescriptor(KeyEvent.VK_0, KeyEvent.VK_0, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("0", false, 0), new KeySymDescriptor(")", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_MINUS, new KeyDescriptor(KeyEvent.VK_MINUS, KeyEvent.VK_MINUS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("-", false, 0), new KeySymDescriptor("_", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_EQUALS, new KeyDescriptor(KeyEvent.VK_EQUALS, KeyEvent.VK_EQUALS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("=", false, 0), new KeySymDescriptor("+", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_BACK_SPACE, new KeyDescriptor(KeyEvent.VK_BACK_SPACE, KeyEvent.VK_BACK_SPACE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0008", false, 0), new KeySymDescriptor("\u0008", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_TAB, new KeyDescriptor(KeyEvent.VK_TAB, KeyEvent.VK_TAB, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\t", false, 0), new KeySymDescriptor("", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_Q, new KeyDescriptor(KeyEvent.VK_Q, KeyEvent.VK_Q, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("q", false, 0), new KeySymDescriptor("Q", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_W, new KeyDescriptor(KeyEvent.VK_W, KeyEvent.VK_W, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("w", false, 0), new KeySymDescriptor("W", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_E, new KeyDescriptor(KeyEvent.VK_E, KeyEvent.VK_E, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("e", false, 0), new KeySymDescriptor("E", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_R, new KeyDescriptor(KeyEvent.VK_R, KeyEvent.VK_R, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("r", false, 0), new KeySymDescriptor("R", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_T, new KeyDescriptor(KeyEvent.VK_T, KeyEvent.VK_T, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("t", false, 0), new KeySymDescriptor("T", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_Y, new KeyDescriptor(KeyEvent.VK_Y, KeyEvent.VK_Y, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("y", false, 0), new KeySymDescriptor("Y", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_U, new KeyDescriptor(KeyEvent.VK_U, KeyEvent.VK_U, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("u", false, 0), new KeySymDescriptor("U", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_I, new KeyDescriptor(KeyEvent.VK_I, KeyEvent.VK_I, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("i", false, 0), new KeySymDescriptor("I", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_O, new KeyDescriptor(KeyEvent.VK_O, KeyEvent.VK_O, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("o", false, 0), new KeySymDescriptor("O", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_P, new KeyDescriptor(KeyEvent.VK_P, KeyEvent.VK_P, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("p", false, 0), new KeySymDescriptor("P", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_OPEN_BRACKET, new KeyDescriptor(KeyEvent.VK_OPEN_BRACKET, KeyEvent.VK_OPEN_BRACKET, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("[", false, 0), new KeySymDescriptor("{", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_CLOSE_BRACKET, new KeyDescriptor(KeyEvent.VK_CLOSE_BRACKET, KeyEvent.VK_CLOSE_BRACKET, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("]", false, 0), new KeySymDescriptor("}", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_ENTER, new KeyDescriptor(KeyEvent.VK_ENTER, KeyEvent.VK_ENTER, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\r", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_CONTROL, new KeyDescriptor(KeyEvent.VK_CONTROL, KeyEvent.VK_CONTROL, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_A, new KeyDescriptor(KeyEvent.VK_A, KeyEvent.VK_A, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("a", false, 0), new KeySymDescriptor("A", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_S, new KeyDescriptor(KeyEvent.VK_S, KeyEvent.VK_S, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("s", false, 0), new KeySymDescriptor("S", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_D, new KeyDescriptor(KeyEvent.VK_D, KeyEvent.VK_D, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("d", false, 0), new KeySymDescriptor("D", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_F, new KeyDescriptor(KeyEvent.VK_F, KeyEvent.VK_F, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("f", false, 0), new KeySymDescriptor("F", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_G, new KeyDescriptor(KeyEvent.VK_G, KeyEvent.VK_G, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("g", false, 0), new KeySymDescriptor("G", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_H, new KeyDescriptor(KeyEvent.VK_H, KeyEvent.VK_H, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("h", false, 0), new KeySymDescriptor("H", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_J, new KeyDescriptor(KeyEvent.VK_J, KeyEvent.VK_J, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("j", false, 0), new KeySymDescriptor("J", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_K, new KeyDescriptor(KeyEvent.VK_K, KeyEvent.VK_K, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("k", false, 0), new KeySymDescriptor("K", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_L, new KeyDescriptor(KeyEvent.VK_L, KeyEvent.VK_L, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("l", false, 0), new KeySymDescriptor("L", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_SEMICOLON, new KeyDescriptor(KeyEvent.VK_SEMICOLON, KeyEvent.VK_SEMICOLON, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor(";", false, 0), new KeySymDescriptor(":", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_QUOTE, new KeyDescriptor(KeyEvent.VK_QUOTE, KeyEvent.VK_QUOTE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("'", false, 0), new KeySymDescriptor("\"", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_BACK_QUOTE, new KeyDescriptor(KeyEvent.VK_BACK_QUOTE, KeyEvent.VK_BACK_QUOTE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("`", false, 0), new KeySymDescriptor("~", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_SHIFT, new KeyDescriptor(KeyEvent.VK_SHIFT, KeyEvent.VK_SHIFT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_BACK_SLASH, new KeyDescriptor(KeyEvent.VK_BACK_SLASH, KeyEvent.VK_BACK_SLASH, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\\", false, 0), new KeySymDescriptor("|", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_Z, new KeyDescriptor(KeyEvent.VK_Z, KeyEvent.VK_Z, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("z", false, 0), new KeySymDescriptor("Z", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_X, new KeyDescriptor(KeyEvent.VK_X, KeyEvent.VK_X, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("x", false, 0), new KeySymDescriptor("X", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_C, new KeyDescriptor(KeyEvent.VK_C, KeyEvent.VK_C, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("c", false, 0), new KeySymDescriptor("C", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_V, new KeyDescriptor(KeyEvent.VK_V, KeyEvent.VK_V, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("v", false, 0), new KeySymDescriptor("V", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_B, new KeyDescriptor(KeyEvent.VK_B, KeyEvent.VK_B, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("b", false, 0), new KeySymDescriptor("B", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_N, new KeyDescriptor(KeyEvent.VK_N, KeyEvent.VK_N, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("n", false, 0), new KeySymDescriptor("N", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_M, new KeyDescriptor(KeyEvent.VK_M, KeyEvent.VK_M, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("m", false, 0), new KeySymDescriptor("M", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_COMMA, new KeyDescriptor(KeyEvent.VK_COMMA, KeyEvent.VK_COMMA, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor(",", false, 0), new KeySymDescriptor("<", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_PERIOD, new KeyDescriptor(KeyEvent.VK_PERIOD, KeyEvent.VK_PERIOD, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor(".", false, 0), new KeySymDescriptor(">", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_SLASH, new KeyDescriptor(KeyEvent.VK_SLASH, KeyEvent.VK_SLASH, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("/", false, 0), new KeySymDescriptor("?", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_MULTIPLY, new KeyDescriptor(KeyEvent.VK_MULTIPLY, KeyEvent.VK_MULTIPLY, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("*", false, 0), new KeySymDescriptor("*", false, 1), new KeySymDescriptor("*", false, 128), new KeySymDescriptor("*", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_ALT, new KeyDescriptor(KeyEvent.VK_ALT, KeyEvent.VK_ALT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_SPACE, new KeyDescriptor(KeyEvent.VK_SPACE, KeyEvent.VK_SPACE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor(" ", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_CAPS_LOCK, new KeyDescriptor(KeyEvent.VK_CAPS_LOCK, KeyEvent.VK_CAPS_LOCK, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F1, new KeyDescriptor(KeyEvent.VK_F1, KeyEvent.VK_F1, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F2, new KeyDescriptor(KeyEvent.VK_F2, KeyEvent.VK_F2, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F3, new KeyDescriptor(KeyEvent.VK_F3, KeyEvent.VK_F3, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F4, new KeyDescriptor(KeyEvent.VK_F4, KeyEvent.VK_F4, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F5, new KeyDescriptor(KeyEvent.VK_F5, KeyEvent.VK_F5, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F6, new KeyDescriptor(KeyEvent.VK_F6, KeyEvent.VK_F6, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F7, new KeyDescriptor(KeyEvent.VK_F7, KeyEvent.VK_F7, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F8, new KeyDescriptor(KeyEvent.VK_F8, KeyEvent.VK_F8, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F9, new KeyDescriptor(KeyEvent.VK_F9, KeyEvent.VK_F9, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F10, new KeyDescriptor(KeyEvent.VK_F10, KeyEvent.VK_F10, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_NUM_LOCK, new KeyDescriptor(KeyEvent.VK_NUM_LOCK, KeyEvent.VK_NUM_LOCK, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD7, new KeyDescriptor(KeyEvent.VK_NUMPAD7, KeyEvent.VK_HOME, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("7", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD8, new KeyDescriptor(KeyEvent.VK_NUMPAD8, KeyEvent.VK_KP_UP, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("8", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD9, new KeyDescriptor(KeyEvent.VK_NUMPAD9, KeyEvent.VK_PAGE_UP, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("9", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_SUBTRACT, new KeyDescriptor(KeyEvent.VK_SUBTRACT, KeyEvent.VK_SUBTRACT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("-", false, 0), new KeySymDescriptor("-", false, 1), new KeySymDescriptor("-", false, 128), new KeySymDescriptor("-", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD4, new KeyDescriptor(KeyEvent.VK_NUMPAD4, KeyEvent.VK_KP_LEFT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("4", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD5, new KeyDescriptor(KeyEvent.VK_NUMPAD5, KeyEvent.VK_BEGIN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("5", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD6, new KeyDescriptor(KeyEvent.VK_NUMPAD6, KeyEvent.VK_KP_RIGHT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("6", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_ADD, new KeyDescriptor(KeyEvent.VK_ADD, KeyEvent.VK_ADD, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("+", false, 0), new KeySymDescriptor("+", false, 1), new KeySymDescriptor("+", false, 128), new KeySymDescriptor("+", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD1, new KeyDescriptor(KeyEvent.VK_NUMPAD1, KeyEvent.VK_END, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("1", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD2, new KeyDescriptor(KeyEvent.VK_NUMPAD2, KeyEvent.VK_KP_DOWN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("2", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD3, new KeyDescriptor(KeyEvent.VK_NUMPAD3, KeyEvent.VK_PAGE_DOWN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("3", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD0, new KeyDescriptor(KeyEvent.VK_NUMPAD0, KeyEvent.VK_INSERT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("0", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_DECIMAL, new KeyDescriptor(KeyEvent.VK_DECIMAL, KeyEvent.VK_DELETE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor(".", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_LESS, new KeyDescriptor(KeyEvent.VK_LESS, KeyEvent.VK_LESS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("<", false, 0), new KeySymDescriptor(">", false, 1), new KeySymDescriptor("|", false, 128), new KeySymDescriptor("\u00a6", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_F11, new KeyDescriptor(KeyEvent.VK_F11, KeyEvent.VK_F11, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F12, new KeyDescriptor(KeyEvent.VK_F12, KeyEvent.VK_F12, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_DIVIDE, new KeyDescriptor(KeyEvent.VK_DIVIDE, KeyEvent.VK_DIVIDE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("/", false, 0), new KeySymDescriptor("/", false, 1), new KeySymDescriptor("/", false, 128), new KeySymDescriptor("/", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_PRINTSCREEN, new KeyDescriptor(KeyEvent.VK_PRINTSCREEN, KeyEvent.VK_PRINTSCREEN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 8))));
|
||||
layout.keys.put(KeyEvent.VK_ALT_GRAPH, new KeyDescriptor(KeyEvent.VK_ALT_GRAPH, KeyEvent.VK_ALT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_HOME, new KeyDescriptor(KeyEvent.VK_HOME, KeyEvent.VK_HOME, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_UP, new KeyDescriptor(KeyEvent.VK_UP, KeyEvent.VK_UP, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_PAGE_UP, new KeyDescriptor(KeyEvent.VK_PAGE_UP, KeyEvent.VK_PAGE_UP, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_LEFT, new KeyDescriptor(KeyEvent.VK_LEFT, KeyEvent.VK_LEFT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_RIGHT, new KeyDescriptor(KeyEvent.VK_RIGHT, KeyEvent.VK_RIGHT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_END, new KeyDescriptor(KeyEvent.VK_END, KeyEvent.VK_END, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_DOWN, new KeyDescriptor(KeyEvent.VK_DOWN, KeyEvent.VK_DOWN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_PAGE_DOWN, new KeyDescriptor(KeyEvent.VK_PAGE_DOWN, KeyEvent.VK_PAGE_DOWN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_INSERT, new KeyDescriptor(KeyEvent.VK_INSERT, KeyEvent.VK_INSERT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_DELETE, new KeyDescriptor(KeyEvent.VK_DELETE, KeyEvent.VK_DELETE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u007f", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_PAUSE, new KeyDescriptor(KeyEvent.VK_PAUSE, KeyEvent.VK_PAUSE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 4))));
|
||||
layout.keys.put(KeyEvent.VK_META, new KeyDescriptor(KeyEvent.VK_META, KeyEvent.VK_WINDOWS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_WINDOWS, new KeyDescriptor(KeyEvent.VK_WINDOWS, KeyEvent.VK_WINDOWS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F13, new KeyDescriptor(KeyEvent.VK_F13, KeyEvent.VK_F13, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F14, new KeyDescriptor(KeyEvent.VK_F14, KeyEvent.VK_F14, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F15, new KeyDescriptor(KeyEvent.VK_F15, KeyEvent.VK_F15, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F16, new KeyDescriptor(KeyEvent.VK_F16, KeyEvent.VK_F16, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F17, new KeyDescriptor(KeyEvent.VK_F17, KeyEvent.VK_F17, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F18, new KeyDescriptor(KeyEvent.VK_F18, KeyEvent.VK_F18, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F20, new KeyDescriptor(KeyEvent.VK_F20, KeyEvent.VK_F20, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F21, new KeyDescriptor(KeyEvent.VK_F21, KeyEvent.VK_F21, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F22, new KeyDescriptor(KeyEvent.VK_F22, KeyEvent.VK_F22, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F23, new KeyDescriptor(KeyEvent.VK_F23, KeyEvent.VK_F23, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layouts.add(layout);
|
||||
}
|
||||
|
||||
{
|
||||
var layout = new LayoutDescriptor("us", "intl", "English (US, intl., with dead keys)", true, new HashMap<>());
|
||||
layout.keys.put(KeyEvent.VK_ESCAPE, new KeyDescriptor(KeyEvent.VK_ESCAPE, KeyEvent.VK_ESCAPE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u001b", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_1, new KeyDescriptor(KeyEvent.VK_1, KeyEvent.VK_1, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("1", false, 0), new KeySymDescriptor("!", false, 1), new KeySymDescriptor("\u00a1", false, 128), new KeySymDescriptor("\u00b9", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_2, new KeyDescriptor(KeyEvent.VK_2, KeyEvent.VK_2, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("2", false, 0), new KeySymDescriptor("@", false, 1), new KeySymDescriptor("\u00b2", false, 128), new KeySymDescriptor("\u02dd", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_3, new KeyDescriptor(KeyEvent.VK_3, KeyEvent.VK_3, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("3", false, 0), new KeySymDescriptor("#", false, 1), new KeySymDescriptor("\u00b3", false, 128), new KeySymDescriptor("\u00af", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_4, new KeyDescriptor(KeyEvent.VK_4, KeyEvent.VK_4, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("4", false, 0), new KeySymDescriptor("$", false, 1), new KeySymDescriptor("\u00a4", false, 128), new KeySymDescriptor("\u00a3", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_5, new KeyDescriptor(KeyEvent.VK_5, KeyEvent.VK_5, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("5", false, 0), new KeySymDescriptor("%", false, 1), new KeySymDescriptor("\u20ac", false, 128), new KeySymDescriptor("\u00b8", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_6, new KeyDescriptor(KeyEvent.VK_6, KeyEvent.VK_6, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("6", false, 0), new KeySymDescriptor("^", true, 1), new KeySymDescriptor("\u00bc", false, 128), new KeySymDescriptor("^", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_7, new KeyDescriptor(KeyEvent.VK_7, KeyEvent.VK_7, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("7", false, 0), new KeySymDescriptor("&", false, 1), new KeySymDescriptor("\u00bd", false, 128), new KeySymDescriptor("\u031b", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_8, new KeyDescriptor(KeyEvent.VK_8, KeyEvent.VK_8, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("8", false, 0), new KeySymDescriptor("*", false, 1), new KeySymDescriptor("\u00be", false, 128), new KeySymDescriptor("\u02db", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_9, new KeyDescriptor(KeyEvent.VK_9, KeyEvent.VK_9, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("9", false, 0), new KeySymDescriptor("(", false, 1), new KeySymDescriptor("\u2018", false, 128), new KeySymDescriptor("\u02d8", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_0, new KeyDescriptor(KeyEvent.VK_0, KeyEvent.VK_0, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("0", false, 0), new KeySymDescriptor(")", false, 1), new KeySymDescriptor("\u2019", false, 128), new KeySymDescriptor("\u00b0", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_MINUS, new KeyDescriptor(KeyEvent.VK_MINUS, KeyEvent.VK_MINUS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("-", false, 0), new KeySymDescriptor("_", false, 1), new KeySymDescriptor("\u00a5", false, 128), new KeySymDescriptor("\u0323", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_EQUALS, new KeyDescriptor(KeyEvent.VK_EQUALS, KeyEvent.VK_EQUALS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("=", false, 0), new KeySymDescriptor("+", false, 1), new KeySymDescriptor("\u00d7", false, 128), new KeySymDescriptor("\u00f7", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_BACK_SPACE, new KeyDescriptor(KeyEvent.VK_BACK_SPACE, KeyEvent.VK_BACK_SPACE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0008", false, 0), new KeySymDescriptor("\u0008", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_TAB, new KeyDescriptor(KeyEvent.VK_TAB, KeyEvent.VK_TAB, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\t", false, 0), new KeySymDescriptor("", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_Q, new KeyDescriptor(KeyEvent.VK_Q, KeyEvent.VK_Q, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("q", false, 0), new KeySymDescriptor("Q", false, 1), new KeySymDescriptor("\u00e4", false, 128), new KeySymDescriptor("\u00c4", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_W, new KeyDescriptor(KeyEvent.VK_W, KeyEvent.VK_W, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("w", false, 0), new KeySymDescriptor("W", false, 1), new KeySymDescriptor("\u00e5", false, 128), new KeySymDescriptor("\u00c5", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_E, new KeyDescriptor(KeyEvent.VK_E, KeyEvent.VK_E, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("e", false, 0), new KeySymDescriptor("E", false, 1), new KeySymDescriptor("\u00e9", false, 128), new KeySymDescriptor("\u00c9", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_R, new KeyDescriptor(KeyEvent.VK_R, KeyEvent.VK_R, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("r", false, 0), new KeySymDescriptor("R", false, 1), new KeySymDescriptor("\u00ae", false, 128), new KeySymDescriptor("\u2122", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_T, new KeyDescriptor(KeyEvent.VK_T, KeyEvent.VK_T, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("t", false, 0), new KeySymDescriptor("T", false, 1), new KeySymDescriptor("\u00fe", false, 128), new KeySymDescriptor("\u00de", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_Y, new KeyDescriptor(KeyEvent.VK_Y, KeyEvent.VK_Y, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("y", false, 0), new KeySymDescriptor("Y", false, 1), new KeySymDescriptor("\u00fc", false, 128), new KeySymDescriptor("\u00dc", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_U, new KeyDescriptor(KeyEvent.VK_U, KeyEvent.VK_U, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("u", false, 0), new KeySymDescriptor("U", false, 1), new KeySymDescriptor("\u00fa", false, 128), new KeySymDescriptor("\u00da", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_I, new KeyDescriptor(KeyEvent.VK_I, KeyEvent.VK_I, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("i", false, 0), new KeySymDescriptor("I", false, 1), new KeySymDescriptor("\u00ed", false, 128), new KeySymDescriptor("\u00cd", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_O, new KeyDescriptor(KeyEvent.VK_O, KeyEvent.VK_O, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("o", false, 0), new KeySymDescriptor("O", false, 1), new KeySymDescriptor("\u00f3", false, 128), new KeySymDescriptor("\u00d3", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_P, new KeyDescriptor(KeyEvent.VK_P, KeyEvent.VK_P, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("p", false, 0), new KeySymDescriptor("P", false, 1), new KeySymDescriptor("\u00f6", false, 128), new KeySymDescriptor("\u00d6", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_OPEN_BRACKET, new KeyDescriptor(KeyEvent.VK_OPEN_BRACKET, KeyEvent.VK_OPEN_BRACKET, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("[", false, 0), new KeySymDescriptor("{", false, 1), new KeySymDescriptor("\u00ab", false, 128), new KeySymDescriptor("\u201c", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_CLOSE_BRACKET, new KeyDescriptor(KeyEvent.VK_CLOSE_BRACKET, KeyEvent.VK_CLOSE_BRACKET, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("]", false, 0), new KeySymDescriptor("}", false, 1), new KeySymDescriptor("\u00bb", false, 128), new KeySymDescriptor("\u201d", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_ENTER, new KeyDescriptor(KeyEvent.VK_ENTER, KeyEvent.VK_ENTER, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\r", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_CONTROL, new KeyDescriptor(KeyEvent.VK_CONTROL, KeyEvent.VK_CONTROL, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_A, new KeyDescriptor(KeyEvent.VK_A, KeyEvent.VK_A, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("a", false, 0), new KeySymDescriptor("A", false, 1), new KeySymDescriptor("\u00e1", false, 128), new KeySymDescriptor("\u00c1", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_S, new KeyDescriptor(KeyEvent.VK_S, KeyEvent.VK_S, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("s", false, 0), new KeySymDescriptor("S", false, 1), new KeySymDescriptor("\u00df", false, 128), new KeySymDescriptor("\u00a7", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_D, new KeyDescriptor(KeyEvent.VK_D, KeyEvent.VK_D, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("d", false, 0), new KeySymDescriptor("D", false, 1), new KeySymDescriptor("\u00f0", false, 128), new KeySymDescriptor("\u00d0", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_F, new KeyDescriptor(KeyEvent.VK_F, KeyEvent.VK_F, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("f", false, 0), new KeySymDescriptor("F", false, 1), new KeySymDescriptor("f", false, 128), new KeySymDescriptor("F", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_G, new KeyDescriptor(KeyEvent.VK_G, KeyEvent.VK_G, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("g", false, 0), new KeySymDescriptor("G", false, 1), new KeySymDescriptor("g", false, 128), new KeySymDescriptor("G", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_H, new KeyDescriptor(KeyEvent.VK_H, KeyEvent.VK_H, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("h", false, 0), new KeySymDescriptor("H", false, 1), new KeySymDescriptor("h", false, 128), new KeySymDescriptor("H", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_J, new KeyDescriptor(KeyEvent.VK_J, KeyEvent.VK_J, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("j", false, 0), new KeySymDescriptor("J", false, 1), new KeySymDescriptor("j", false, 128), new KeySymDescriptor("J", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_K, new KeyDescriptor(KeyEvent.VK_K, KeyEvent.VK_K, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("k", false, 0), new KeySymDescriptor("K", false, 1), new KeySymDescriptor("\u0153", false, 128), new KeySymDescriptor("\u0152", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_L, new KeyDescriptor(KeyEvent.VK_L, KeyEvent.VK_L, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("l", false, 0), new KeySymDescriptor("L", false, 1), new KeySymDescriptor("\u00f8", false, 128), new KeySymDescriptor("\u00d8", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_SEMICOLON, new KeyDescriptor(KeyEvent.VK_SEMICOLON, KeyEvent.VK_SEMICOLON, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor(";", false, 0), new KeySymDescriptor(":", false, 1), new KeySymDescriptor("\u00b6", false, 128), new KeySymDescriptor("\u00b0", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_QUOTE, new KeyDescriptor(KeyEvent.VK_QUOTE, KeyEvent.VK_DEAD_ACUTE, KeyEvent.VK_QUOTE, List.of(new KeySymDescriptor("'", true, 0), new KeySymDescriptor("\"", true, 1), new KeySymDescriptor("'", false, 128), new KeySymDescriptor("\"", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_BACK_QUOTE, new KeyDescriptor(KeyEvent.VK_BACK_QUOTE, KeyEvent.VK_DEAD_GRAVE, KeyEvent.VK_BACK_QUOTE, List.of(new KeySymDescriptor("`", true, 0), new KeySymDescriptor("~", true, 1), new KeySymDescriptor("`", false, 128), new KeySymDescriptor("~", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_SHIFT, new KeyDescriptor(KeyEvent.VK_SHIFT, KeyEvent.VK_SHIFT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_BACK_SLASH, new KeyDescriptor(KeyEvent.VK_BACK_SLASH, KeyEvent.VK_BACK_SLASH, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\\", false, 0), new KeySymDescriptor("|", false, 1), new KeySymDescriptor("\u00ac", false, 128), new KeySymDescriptor("\u00a6", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_Z, new KeyDescriptor(KeyEvent.VK_Z, KeyEvent.VK_Z, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("z", false, 0), new KeySymDescriptor("Z", false, 1), new KeySymDescriptor("\u00e6", false, 128), new KeySymDescriptor("\u00c6", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_X, new KeyDescriptor(KeyEvent.VK_X, KeyEvent.VK_X, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("x", false, 0), new KeySymDescriptor("X", false, 1), new KeySymDescriptor("x", false, 128), new KeySymDescriptor("X", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_C, new KeyDescriptor(KeyEvent.VK_C, KeyEvent.VK_C, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("c", false, 0), new KeySymDescriptor("C", false, 1), new KeySymDescriptor("\u00a9", false, 128), new KeySymDescriptor("\u00a2", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_V, new KeyDescriptor(KeyEvent.VK_V, KeyEvent.VK_V, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("v", false, 0), new KeySymDescriptor("V", false, 1), new KeySymDescriptor("v", false, 128), new KeySymDescriptor("V", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_B, new KeyDescriptor(KeyEvent.VK_B, KeyEvent.VK_B, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("b", false, 0), new KeySymDescriptor("B", false, 1), new KeySymDescriptor("b", false, 128), new KeySymDescriptor("B", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_N, new KeyDescriptor(KeyEvent.VK_N, KeyEvent.VK_N, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("n", false, 0), new KeySymDescriptor("N", false, 1), new KeySymDescriptor("\u00f1", false, 128), new KeySymDescriptor("\u00d1", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_M, new KeyDescriptor(KeyEvent.VK_M, KeyEvent.VK_M, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("m", false, 0), new KeySymDescriptor("M", false, 1), new KeySymDescriptor("\u00b5", false, 128), new KeySymDescriptor("\u00b5", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_COMMA, new KeyDescriptor(KeyEvent.VK_COMMA, KeyEvent.VK_COMMA, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor(",", false, 0), new KeySymDescriptor("<", false, 1), new KeySymDescriptor("\u00e7", false, 128), new KeySymDescriptor("\u00c7", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_PERIOD, new KeyDescriptor(KeyEvent.VK_PERIOD, KeyEvent.VK_PERIOD, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor(".", false, 0), new KeySymDescriptor(">", false, 1), new KeySymDescriptor("\u02d9", true, 128), new KeySymDescriptor("\u02c7", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_SLASH, new KeyDescriptor(KeyEvent.VK_SLASH, KeyEvent.VK_SLASH, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("/", false, 0), new KeySymDescriptor("?", false, 1), new KeySymDescriptor("\u00bf", false, 128), new KeySymDescriptor("\u0309", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_MULTIPLY, new KeyDescriptor(KeyEvent.VK_MULTIPLY, KeyEvent.VK_MULTIPLY, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("*", false, 0), new KeySymDescriptor("*", false, 1), new KeySymDescriptor("*", false, 128), new KeySymDescriptor("*", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_ALT, new KeyDescriptor(KeyEvent.VK_ALT, KeyEvent.VK_ALT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_SPACE, new KeyDescriptor(KeyEvent.VK_SPACE, KeyEvent.VK_SPACE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor(" ", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_CAPS_LOCK, new KeyDescriptor(KeyEvent.VK_CAPS_LOCK, KeyEvent.VK_CAPS_LOCK, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F1, new KeyDescriptor(KeyEvent.VK_F1, KeyEvent.VK_F1, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F2, new KeyDescriptor(KeyEvent.VK_F2, KeyEvent.VK_F2, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F3, new KeyDescriptor(KeyEvent.VK_F3, KeyEvent.VK_F3, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F4, new KeyDescriptor(KeyEvent.VK_F4, KeyEvent.VK_F4, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F5, new KeyDescriptor(KeyEvent.VK_F5, KeyEvent.VK_F5, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F6, new KeyDescriptor(KeyEvent.VK_F6, KeyEvent.VK_F6, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F7, new KeyDescriptor(KeyEvent.VK_F7, KeyEvent.VK_F7, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F8, new KeyDescriptor(KeyEvent.VK_F8, KeyEvent.VK_F8, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F9, new KeyDescriptor(KeyEvent.VK_F9, KeyEvent.VK_F9, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F10, new KeyDescriptor(KeyEvent.VK_F10, KeyEvent.VK_F10, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_NUM_LOCK, new KeyDescriptor(KeyEvent.VK_NUM_LOCK, KeyEvent.VK_NUM_LOCK, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD7, new KeyDescriptor(KeyEvent.VK_NUMPAD7, KeyEvent.VK_HOME, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("7", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD8, new KeyDescriptor(KeyEvent.VK_NUMPAD8, KeyEvent.VK_KP_UP, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("8", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD9, new KeyDescriptor(KeyEvent.VK_NUMPAD9, KeyEvent.VK_PAGE_UP, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("9", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_SUBTRACT, new KeyDescriptor(KeyEvent.VK_SUBTRACT, KeyEvent.VK_SUBTRACT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("-", false, 0), new KeySymDescriptor("-", false, 1), new KeySymDescriptor("-", false, 128), new KeySymDescriptor("-", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD4, new KeyDescriptor(KeyEvent.VK_NUMPAD4, KeyEvent.VK_KP_LEFT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("4", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD5, new KeyDescriptor(KeyEvent.VK_NUMPAD5, KeyEvent.VK_BEGIN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("5", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD6, new KeyDescriptor(KeyEvent.VK_NUMPAD6, KeyEvent.VK_KP_RIGHT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("6", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_ADD, new KeyDescriptor(KeyEvent.VK_ADD, KeyEvent.VK_ADD, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("+", false, 0), new KeySymDescriptor("+", false, 1), new KeySymDescriptor("+", false, 128), new KeySymDescriptor("+", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD1, new KeyDescriptor(KeyEvent.VK_NUMPAD1, KeyEvent.VK_END, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("1", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD2, new KeyDescriptor(KeyEvent.VK_NUMPAD2, KeyEvent.VK_KP_DOWN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("2", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD3, new KeyDescriptor(KeyEvent.VK_NUMPAD3, KeyEvent.VK_PAGE_DOWN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("3", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD0, new KeyDescriptor(KeyEvent.VK_NUMPAD0, KeyEvent.VK_INSERT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("0", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_DECIMAL, new KeyDescriptor(KeyEvent.VK_DECIMAL, KeyEvent.VK_DELETE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor(".", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_LESS, new KeyDescriptor(KeyEvent.VK_LESS, KeyEvent.VK_BACK_SLASH, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\\", false, 0), new KeySymDescriptor("|", false, 1), new KeySymDescriptor("\\", false, 128), new KeySymDescriptor("|", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_F11, new KeyDescriptor(KeyEvent.VK_F11, KeyEvent.VK_F11, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F12, new KeyDescriptor(KeyEvent.VK_F12, KeyEvent.VK_F12, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_DIVIDE, new KeyDescriptor(KeyEvent.VK_DIVIDE, KeyEvent.VK_DIVIDE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("/", false, 0), new KeySymDescriptor("/", false, 1), new KeySymDescriptor("/", false, 128), new KeySymDescriptor("/", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_PRINTSCREEN, new KeyDescriptor(KeyEvent.VK_PRINTSCREEN, KeyEvent.VK_PRINTSCREEN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 8))));
|
||||
layout.keys.put(KeyEvent.VK_ALT_GRAPH, new KeyDescriptor(KeyEvent.VK_ALT_GRAPH, KeyEvent.VK_ALT_GRAPH, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_HOME, new KeyDescriptor(KeyEvent.VK_HOME, KeyEvent.VK_HOME, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_UP, new KeyDescriptor(KeyEvent.VK_UP, KeyEvent.VK_UP, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_PAGE_UP, new KeyDescriptor(KeyEvent.VK_PAGE_UP, KeyEvent.VK_PAGE_UP, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_LEFT, new KeyDescriptor(KeyEvent.VK_LEFT, KeyEvent.VK_LEFT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_RIGHT, new KeyDescriptor(KeyEvent.VK_RIGHT, KeyEvent.VK_RIGHT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_END, new KeyDescriptor(KeyEvent.VK_END, KeyEvent.VK_END, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_DOWN, new KeyDescriptor(KeyEvent.VK_DOWN, KeyEvent.VK_DOWN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_PAGE_DOWN, new KeyDescriptor(KeyEvent.VK_PAGE_DOWN, KeyEvent.VK_PAGE_DOWN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_INSERT, new KeyDescriptor(KeyEvent.VK_INSERT, KeyEvent.VK_INSERT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_DELETE, new KeyDescriptor(KeyEvent.VK_DELETE, KeyEvent.VK_DELETE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u007f", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_PAUSE, new KeyDescriptor(KeyEvent.VK_PAUSE, KeyEvent.VK_PAUSE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 4))));
|
||||
layout.keys.put(KeyEvent.VK_META, new KeyDescriptor(KeyEvent.VK_META, KeyEvent.VK_WINDOWS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_WINDOWS, new KeyDescriptor(KeyEvent.VK_WINDOWS, KeyEvent.VK_WINDOWS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F13, new KeyDescriptor(KeyEvent.VK_F13, KeyEvent.VK_F13, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F14, new KeyDescriptor(KeyEvent.VK_F14, KeyEvent.VK_F14, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F15, new KeyDescriptor(KeyEvent.VK_F15, KeyEvent.VK_F15, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F16, new KeyDescriptor(KeyEvent.VK_F16, KeyEvent.VK_F16, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F17, new KeyDescriptor(KeyEvent.VK_F17, KeyEvent.VK_F17, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F18, new KeyDescriptor(KeyEvent.VK_F18, KeyEvent.VK_F18, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F20, new KeyDescriptor(KeyEvent.VK_F20, KeyEvent.VK_F20, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F21, new KeyDescriptor(KeyEvent.VK_F21, KeyEvent.VK_F21, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F22, new KeyDescriptor(KeyEvent.VK_F22, KeyEvent.VK_F22, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F23, new KeyDescriptor(KeyEvent.VK_F23, KeyEvent.VK_F23, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layouts.add(layout);
|
||||
}
|
||||
|
||||
{
|
||||
var layout = new LayoutDescriptor("us", "altgr-intl", "English (intl., with AltGr dead keys)", true, new HashMap<>());
|
||||
layout.keys.put(KeyEvent.VK_ESCAPE, new KeyDescriptor(KeyEvent.VK_ESCAPE, KeyEvent.VK_ESCAPE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u001b", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_1, new KeyDescriptor(KeyEvent.VK_1, KeyEvent.VK_1, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("1", false, 0), new KeySymDescriptor("!", false, 1), new KeySymDescriptor("\u00b9", false, 128), new KeySymDescriptor("\u00a1", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_2, new KeyDescriptor(KeyEvent.VK_2, KeyEvent.VK_2, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("2", false, 0), new KeySymDescriptor("@", false, 1), new KeySymDescriptor("\u00b2", false, 128), new KeySymDescriptor("\u02dd", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_3, new KeyDescriptor(KeyEvent.VK_3, KeyEvent.VK_3, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("3", false, 0), new KeySymDescriptor("#", false, 1), new KeySymDescriptor("\u00b3", false, 128), new KeySymDescriptor("\u00af", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_4, new KeyDescriptor(KeyEvent.VK_4, KeyEvent.VK_4, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("4", false, 0), new KeySymDescriptor("$", false, 1), new KeySymDescriptor("\u00a4", false, 128), new KeySymDescriptor("\u00a3", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_5, new KeyDescriptor(KeyEvent.VK_5, KeyEvent.VK_5, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("5", false, 0), new KeySymDescriptor("%", false, 1), new KeySymDescriptor("\u20ac", false, 128), new KeySymDescriptor("\u00b8", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_6, new KeyDescriptor(KeyEvent.VK_6, KeyEvent.VK_6, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("6", false, 0), new KeySymDescriptor("^", false, 1), new KeySymDescriptor("^", true, 128), new KeySymDescriptor("\u00bc", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_7, new KeyDescriptor(KeyEvent.VK_7, KeyEvent.VK_7, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("7", false, 0), new KeySymDescriptor("&", false, 1), new KeySymDescriptor("\u031b", true, 128), new KeySymDescriptor("\u00bd", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_8, new KeyDescriptor(KeyEvent.VK_8, KeyEvent.VK_8, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("8", false, 0), new KeySymDescriptor("*", false, 1), new KeySymDescriptor("\u02db", true, 128), new KeySymDescriptor("\u00be", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_9, new KeyDescriptor(KeyEvent.VK_9, KeyEvent.VK_9, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("9", false, 0), new KeySymDescriptor("(", false, 1), new KeySymDescriptor("\u2018", false, 128), new KeySymDescriptor("\u02d8", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_0, new KeyDescriptor(KeyEvent.VK_0, KeyEvent.VK_0, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("0", false, 0), new KeySymDescriptor(")", false, 1), new KeySymDescriptor("\u2019", false, 128), new KeySymDescriptor("\u00b0", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_MINUS, new KeyDescriptor(KeyEvent.VK_MINUS, KeyEvent.VK_MINUS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("-", false, 0), new KeySymDescriptor("_", false, 1), new KeySymDescriptor("\u00a5", false, 128), new KeySymDescriptor("\u0323", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_EQUALS, new KeyDescriptor(KeyEvent.VK_EQUALS, KeyEvent.VK_EQUALS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("=", false, 0), new KeySymDescriptor("+", false, 1), new KeySymDescriptor("\u00d7", false, 128), new KeySymDescriptor("\u00f7", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_BACK_SPACE, new KeyDescriptor(KeyEvent.VK_BACK_SPACE, KeyEvent.VK_BACK_SPACE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0008", false, 0), new KeySymDescriptor("\u0008", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_TAB, new KeyDescriptor(KeyEvent.VK_TAB, KeyEvent.VK_TAB, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\t", false, 0), new KeySymDescriptor("", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_Q, new KeyDescriptor(KeyEvent.VK_Q, KeyEvent.VK_Q, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("q", false, 0), new KeySymDescriptor("Q", false, 1), new KeySymDescriptor("\u00e4", false, 128), new KeySymDescriptor("\u00c4", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_W, new KeyDescriptor(KeyEvent.VK_W, KeyEvent.VK_W, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("w", false, 0), new KeySymDescriptor("W", false, 1), new KeySymDescriptor("\u00e5", false, 128), new KeySymDescriptor("\u00c5", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_E, new KeyDescriptor(KeyEvent.VK_E, KeyEvent.VK_E, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("e", false, 0), new KeySymDescriptor("E", false, 1), new KeySymDescriptor("\u00e9", false, 128), new KeySymDescriptor("\u00c9", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_R, new KeyDescriptor(KeyEvent.VK_R, KeyEvent.VK_R, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("r", false, 0), new KeySymDescriptor("R", false, 1), new KeySymDescriptor("\u00eb", false, 128), new KeySymDescriptor("\u00cb", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_T, new KeyDescriptor(KeyEvent.VK_T, KeyEvent.VK_T, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("t", false, 0), new KeySymDescriptor("T", false, 1), new KeySymDescriptor("\u00fe", false, 128), new KeySymDescriptor("\u00de", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_Y, new KeyDescriptor(KeyEvent.VK_Y, KeyEvent.VK_Y, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("y", false, 0), new KeySymDescriptor("Y", false, 1), new KeySymDescriptor("\u00fc", false, 128), new KeySymDescriptor("\u00dc", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_U, new KeyDescriptor(KeyEvent.VK_U, KeyEvent.VK_U, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("u", false, 0), new KeySymDescriptor("U", false, 1), new KeySymDescriptor("\u00fa", false, 128), new KeySymDescriptor("\u00da", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_I, new KeyDescriptor(KeyEvent.VK_I, KeyEvent.VK_I, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("i", false, 0), new KeySymDescriptor("I", false, 1), new KeySymDescriptor("\u00ed", false, 128), new KeySymDescriptor("\u00cd", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_O, new KeyDescriptor(KeyEvent.VK_O, KeyEvent.VK_O, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("o", false, 0), new KeySymDescriptor("O", false, 1), new KeySymDescriptor("\u00f3", false, 128), new KeySymDescriptor("\u00d3", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_P, new KeyDescriptor(KeyEvent.VK_P, KeyEvent.VK_P, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("p", false, 0), new KeySymDescriptor("P", false, 1), new KeySymDescriptor("\u00f6", false, 128), new KeySymDescriptor("\u00d6", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_OPEN_BRACKET, new KeyDescriptor(KeyEvent.VK_OPEN_BRACKET, KeyEvent.VK_OPEN_BRACKET, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("[", false, 0), new KeySymDescriptor("{", false, 1), new KeySymDescriptor("\u00ab", false, 128), new KeySymDescriptor("\u201c", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_CLOSE_BRACKET, new KeyDescriptor(KeyEvent.VK_CLOSE_BRACKET, KeyEvent.VK_CLOSE_BRACKET, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("]", false, 0), new KeySymDescriptor("}", false, 1), new KeySymDescriptor("\u00bb", false, 128), new KeySymDescriptor("\u201d", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_ENTER, new KeyDescriptor(KeyEvent.VK_ENTER, KeyEvent.VK_ENTER, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\r", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_CONTROL, new KeyDescriptor(KeyEvent.VK_CONTROL, KeyEvent.VK_CONTROL, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_A, new KeyDescriptor(KeyEvent.VK_A, KeyEvent.VK_A, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("a", false, 0), new KeySymDescriptor("A", false, 1), new KeySymDescriptor("\u00e1", false, 128), new KeySymDescriptor("\u00c1", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_S, new KeyDescriptor(KeyEvent.VK_S, KeyEvent.VK_S, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("s", false, 0), new KeySymDescriptor("S", false, 1), new KeySymDescriptor("\u00df", false, 128), new KeySymDescriptor("\u00a7", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_D, new KeyDescriptor(KeyEvent.VK_D, KeyEvent.VK_D, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("d", false, 0), new KeySymDescriptor("D", false, 1), new KeySymDescriptor("\u00f0", false, 128), new KeySymDescriptor("\u00d0", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_F, new KeyDescriptor(KeyEvent.VK_F, KeyEvent.VK_F, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("f", false, 0), new KeySymDescriptor("F", false, 1), new KeySymDescriptor("f", false, 128), new KeySymDescriptor("F", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_G, new KeyDescriptor(KeyEvent.VK_G, KeyEvent.VK_G, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("g", false, 0), new KeySymDescriptor("G", false, 1), new KeySymDescriptor("g", false, 128), new KeySymDescriptor("G", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_H, new KeyDescriptor(KeyEvent.VK_H, KeyEvent.VK_H, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("h", false, 0), new KeySymDescriptor("H", false, 1), new KeySymDescriptor("h", false, 128), new KeySymDescriptor("H", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_J, new KeyDescriptor(KeyEvent.VK_J, KeyEvent.VK_J, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("j", false, 0), new KeySymDescriptor("J", false, 1), new KeySymDescriptor("\u00ef", false, 128), new KeySymDescriptor("\u00cf", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_K, new KeyDescriptor(KeyEvent.VK_K, KeyEvent.VK_K, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("k", false, 0), new KeySymDescriptor("K", false, 1), new KeySymDescriptor("\u0153", false, 128), new KeySymDescriptor("\u0152", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_L, new KeyDescriptor(KeyEvent.VK_L, KeyEvent.VK_L, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("l", false, 0), new KeySymDescriptor("L", false, 1), new KeySymDescriptor("\u00f8", false, 128), new KeySymDescriptor("\u00d8", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_SEMICOLON, new KeyDescriptor(KeyEvent.VK_SEMICOLON, KeyEvent.VK_SEMICOLON, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor(";", false, 0), new KeySymDescriptor(":", false, 1), new KeySymDescriptor("\u00b6", false, 128), new KeySymDescriptor("\u00b0", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_QUOTE, new KeyDescriptor(KeyEvent.VK_QUOTE, KeyEvent.VK_QUOTE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("'", false, 0), new KeySymDescriptor("\"", false, 1), new KeySymDescriptor("'", true, 128), new KeySymDescriptor("\"", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_BACK_QUOTE, new KeyDescriptor(KeyEvent.VK_BACK_QUOTE, KeyEvent.VK_BACK_QUOTE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("`", false, 0), new KeySymDescriptor("~", false, 1), new KeySymDescriptor("`", true, 128), new KeySymDescriptor("~", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_SHIFT, new KeyDescriptor(KeyEvent.VK_SHIFT, KeyEvent.VK_SHIFT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_BACK_SLASH, new KeyDescriptor(KeyEvent.VK_BACK_SLASH, KeyEvent.VK_BACK_SLASH, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\\", false, 0), new KeySymDescriptor("|", false, 1), new KeySymDescriptor("\u00ac", false, 128), new KeySymDescriptor("\u00a6", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_Z, new KeyDescriptor(KeyEvent.VK_Z, KeyEvent.VK_Z, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("z", false, 0), new KeySymDescriptor("Z", false, 1), new KeySymDescriptor("\u00e6", false, 128), new KeySymDescriptor("\u00c6", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_X, new KeyDescriptor(KeyEvent.VK_X, KeyEvent.VK_X, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("x", false, 0), new KeySymDescriptor("X", false, 1), new KeySymDescriptor("\u0153", false, 128), new KeySymDescriptor("\u0152", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_C, new KeyDescriptor(KeyEvent.VK_C, KeyEvent.VK_C, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("c", false, 0), new KeySymDescriptor("C", false, 1), new KeySymDescriptor("\u00a9", false, 128), new KeySymDescriptor("\u00a2", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_V, new KeyDescriptor(KeyEvent.VK_V, KeyEvent.VK_V, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("v", false, 0), new KeySymDescriptor("V", false, 1), new KeySymDescriptor("\u00ae", false, 128), new KeySymDescriptor("\u2122", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_B, new KeyDescriptor(KeyEvent.VK_B, KeyEvent.VK_B, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("b", false, 0), new KeySymDescriptor("B", false, 1), new KeySymDescriptor("b", false, 128), new KeySymDescriptor("B", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_N, new KeyDescriptor(KeyEvent.VK_N, KeyEvent.VK_N, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("n", false, 0), new KeySymDescriptor("N", false, 1), new KeySymDescriptor("\u00f1", false, 128), new KeySymDescriptor("\u00d1", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_M, new KeyDescriptor(KeyEvent.VK_M, KeyEvent.VK_M, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("m", false, 0), new KeySymDescriptor("M", false, 1), new KeySymDescriptor("\u00b5", false, 128), new KeySymDescriptor("\u00b5", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_COMMA, new KeyDescriptor(KeyEvent.VK_COMMA, KeyEvent.VK_COMMA, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor(",", false, 0), new KeySymDescriptor("<", false, 1), new KeySymDescriptor("\u00e7", false, 128), new KeySymDescriptor("\u00c7", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_PERIOD, new KeyDescriptor(KeyEvent.VK_PERIOD, KeyEvent.VK_PERIOD, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor(".", false, 0), new KeySymDescriptor(">", false, 1), new KeySymDescriptor("\u02d9", true, 128), new KeySymDescriptor("\u02c7", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_SLASH, new KeyDescriptor(KeyEvent.VK_SLASH, KeyEvent.VK_SLASH, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("/", false, 0), new KeySymDescriptor("?", false, 1), new KeySymDescriptor("\u00bf", false, 128), new KeySymDescriptor("\u0309", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_MULTIPLY, new KeyDescriptor(KeyEvent.VK_MULTIPLY, KeyEvent.VK_MULTIPLY, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("*", false, 0), new KeySymDescriptor("*", false, 1), new KeySymDescriptor("*", false, 128), new KeySymDescriptor("*", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_ALT, new KeyDescriptor(KeyEvent.VK_ALT, KeyEvent.VK_ALT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_SPACE, new KeyDescriptor(KeyEvent.VK_SPACE, KeyEvent.VK_SPACE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor(" ", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_CAPS_LOCK, new KeyDescriptor(KeyEvent.VK_CAPS_LOCK, KeyEvent.VK_CAPS_LOCK, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F1, new KeyDescriptor(KeyEvent.VK_F1, KeyEvent.VK_F1, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F2, new KeyDescriptor(KeyEvent.VK_F2, KeyEvent.VK_F2, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F3, new KeyDescriptor(KeyEvent.VK_F3, KeyEvent.VK_F3, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F4, new KeyDescriptor(KeyEvent.VK_F4, KeyEvent.VK_F4, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F5, new KeyDescriptor(KeyEvent.VK_F5, KeyEvent.VK_F5, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F6, new KeyDescriptor(KeyEvent.VK_F6, KeyEvent.VK_F6, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F7, new KeyDescriptor(KeyEvent.VK_F7, KeyEvent.VK_F7, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F8, new KeyDescriptor(KeyEvent.VK_F8, KeyEvent.VK_F8, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F9, new KeyDescriptor(KeyEvent.VK_F9, KeyEvent.VK_F9, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F10, new KeyDescriptor(KeyEvent.VK_F10, KeyEvent.VK_F10, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_NUM_LOCK, new KeyDescriptor(KeyEvent.VK_NUM_LOCK, KeyEvent.VK_NUM_LOCK, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD7, new KeyDescriptor(KeyEvent.VK_NUMPAD7, KeyEvent.VK_HOME, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("7", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD8, new KeyDescriptor(KeyEvent.VK_NUMPAD8, KeyEvent.VK_KP_UP, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("8", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD9, new KeyDescriptor(KeyEvent.VK_NUMPAD9, KeyEvent.VK_PAGE_UP, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("9", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_SUBTRACT, new KeyDescriptor(KeyEvent.VK_SUBTRACT, KeyEvent.VK_SUBTRACT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("-", false, 0), new KeySymDescriptor("-", false, 1), new KeySymDescriptor("-", false, 128), new KeySymDescriptor("-", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD4, new KeyDescriptor(KeyEvent.VK_NUMPAD4, KeyEvent.VK_KP_LEFT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("4", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD5, new KeyDescriptor(KeyEvent.VK_NUMPAD5, KeyEvent.VK_BEGIN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("5", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD6, new KeyDescriptor(KeyEvent.VK_NUMPAD6, KeyEvent.VK_KP_RIGHT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("6", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_ADD, new KeyDescriptor(KeyEvent.VK_ADD, KeyEvent.VK_ADD, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("+", false, 0), new KeySymDescriptor("+", false, 1), new KeySymDescriptor("+", false, 128), new KeySymDescriptor("+", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD1, new KeyDescriptor(KeyEvent.VK_NUMPAD1, KeyEvent.VK_END, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("1", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD2, new KeyDescriptor(KeyEvent.VK_NUMPAD2, KeyEvent.VK_KP_DOWN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("2", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD3, new KeyDescriptor(KeyEvent.VK_NUMPAD3, KeyEvent.VK_PAGE_DOWN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("3", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD0, new KeyDescriptor(KeyEvent.VK_NUMPAD0, KeyEvent.VK_INSERT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("0", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_DECIMAL, new KeyDescriptor(KeyEvent.VK_DECIMAL, KeyEvent.VK_DELETE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor(".", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_LESS, new KeyDescriptor(KeyEvent.VK_LESS, KeyEvent.VK_BACK_SLASH, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\\", false, 0), new KeySymDescriptor("|", false, 1), new KeySymDescriptor("\\", false, 128), new KeySymDescriptor("|", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_F11, new KeyDescriptor(KeyEvent.VK_F11, KeyEvent.VK_F11, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F12, new KeyDescriptor(KeyEvent.VK_F12, KeyEvent.VK_F12, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_DIVIDE, new KeyDescriptor(KeyEvent.VK_DIVIDE, KeyEvent.VK_DIVIDE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("/", false, 0), new KeySymDescriptor("/", false, 1), new KeySymDescriptor("/", false, 128), new KeySymDescriptor("/", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_PRINTSCREEN, new KeyDescriptor(KeyEvent.VK_PRINTSCREEN, KeyEvent.VK_PRINTSCREEN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 8))));
|
||||
layout.keys.put(KeyEvent.VK_ALT_GRAPH, new KeyDescriptor(KeyEvent.VK_ALT_GRAPH, KeyEvent.VK_ALT_GRAPH, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_HOME, new KeyDescriptor(KeyEvent.VK_HOME, KeyEvent.VK_HOME, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_UP, new KeyDescriptor(KeyEvent.VK_UP, KeyEvent.VK_UP, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_PAGE_UP, new KeyDescriptor(KeyEvent.VK_PAGE_UP, KeyEvent.VK_PAGE_UP, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_LEFT, new KeyDescriptor(KeyEvent.VK_LEFT, KeyEvent.VK_LEFT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_RIGHT, new KeyDescriptor(KeyEvent.VK_RIGHT, KeyEvent.VK_RIGHT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_END, new KeyDescriptor(KeyEvent.VK_END, KeyEvent.VK_END, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_DOWN, new KeyDescriptor(KeyEvent.VK_DOWN, KeyEvent.VK_DOWN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_PAGE_DOWN, new KeyDescriptor(KeyEvent.VK_PAGE_DOWN, KeyEvent.VK_PAGE_DOWN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_INSERT, new KeyDescriptor(KeyEvent.VK_INSERT, KeyEvent.VK_INSERT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_DELETE, new KeyDescriptor(KeyEvent.VK_DELETE, KeyEvent.VK_DELETE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u007f", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_PAUSE, new KeyDescriptor(KeyEvent.VK_PAUSE, KeyEvent.VK_PAUSE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 4))));
|
||||
layout.keys.put(KeyEvent.VK_META, new KeyDescriptor(KeyEvent.VK_META, KeyEvent.VK_WINDOWS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_WINDOWS, new KeyDescriptor(KeyEvent.VK_WINDOWS, KeyEvent.VK_WINDOWS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F13, new KeyDescriptor(KeyEvent.VK_F13, KeyEvent.VK_F13, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F14, new KeyDescriptor(KeyEvent.VK_F14, KeyEvent.VK_F14, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F15, new KeyDescriptor(KeyEvent.VK_F15, KeyEvent.VK_F15, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F16, new KeyDescriptor(KeyEvent.VK_F16, KeyEvent.VK_F16, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F17, new KeyDescriptor(KeyEvent.VK_F17, KeyEvent.VK_F17, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F18, new KeyDescriptor(KeyEvent.VK_F18, KeyEvent.VK_F18, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F20, new KeyDescriptor(KeyEvent.VK_F20, KeyEvent.VK_F20, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F21, new KeyDescriptor(KeyEvent.VK_F21, KeyEvent.VK_F21, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F22, new KeyDescriptor(KeyEvent.VK_F22, KeyEvent.VK_F22, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F23, new KeyDescriptor(KeyEvent.VK_F23, KeyEvent.VK_F23, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layouts.add(layout);
|
||||
}
|
||||
|
||||
{
|
||||
var layout = new LayoutDescriptor("de", "", "German", true, new HashMap<>());
|
||||
layout.keys.put(KeyEvent.VK_ESCAPE, new KeyDescriptor(KeyEvent.VK_ESCAPE, KeyEvent.VK_ESCAPE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u001b", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_1, new KeyDescriptor(KeyEvent.VK_1, KeyEvent.VK_1, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("1", false, 0), new KeySymDescriptor("!", false, 1), new KeySymDescriptor("\u00b9", false, 128), new KeySymDescriptor("\u00a1", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_2, new KeyDescriptor(KeyEvent.VK_2, KeyEvent.VK_2, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("2", false, 0), new KeySymDescriptor("\"", false, 1), new KeySymDescriptor("\u00b2", false, 128), new KeySymDescriptor("\u215b", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_3, new KeyDescriptor(KeyEvent.VK_3, KeyEvent.VK_3, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("3", false, 0), new KeySymDescriptor("\u00a7", false, 1), new KeySymDescriptor("\u00b3", false, 128), new KeySymDescriptor("\u00a3", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_4, new KeyDescriptor(KeyEvent.VK_4, KeyEvent.VK_4, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("4", false, 0), new KeySymDescriptor("$", false, 1), new KeySymDescriptor("\u00bc", false, 128), new KeySymDescriptor("\u00a4", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_5, new KeyDescriptor(KeyEvent.VK_5, KeyEvent.VK_5, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("5", false, 0), new KeySymDescriptor("%", false, 1), new KeySymDescriptor("\u00bd", false, 128), new KeySymDescriptor("\u215c", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_6, new KeyDescriptor(KeyEvent.VK_6, KeyEvent.VK_6, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("6", false, 0), new KeySymDescriptor("&", false, 1), new KeySymDescriptor("\u00ac", false, 128), new KeySymDescriptor("\u215d", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_7, new KeyDescriptor(KeyEvent.VK_7, KeyEvent.VK_7, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("7", false, 0), new KeySymDescriptor("/", false, 1), new KeySymDescriptor("{", false, 128), new KeySymDescriptor("\u215e", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_8, new KeyDescriptor(KeyEvent.VK_8, KeyEvent.VK_8, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("8", false, 0), new KeySymDescriptor("(", false, 1), new KeySymDescriptor("[", false, 128), new KeySymDescriptor("\u2122", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_9, new KeyDescriptor(KeyEvent.VK_9, KeyEvent.VK_9, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("9", false, 0), new KeySymDescriptor(")", false, 1), new KeySymDescriptor("]", false, 128), new KeySymDescriptor("\u00b1", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_0, new KeyDescriptor(KeyEvent.VK_0, KeyEvent.VK_0, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("0", false, 0), new KeySymDescriptor("=", false, 1), new KeySymDescriptor("}", false, 128), new KeySymDescriptor("\u00b0", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_MINUS, new KeyDescriptor(KeyEvent.VK_MINUS, KeyEvent.getExtendedKeyCodeForChar(223), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u00df", false, 0), new KeySymDescriptor("?", false, 1), new KeySymDescriptor("\\", false, 128), new KeySymDescriptor("\u00bf", false, 129), new KeySymDescriptor("\u1e9e", false, 2))));
|
||||
layout.keys.put(KeyEvent.VK_EQUALS, new KeyDescriptor(KeyEvent.VK_EQUALS, KeyEvent.VK_DEAD_ACUTE, KeyEvent.VK_QUOTE, List.of(new KeySymDescriptor("'", true, 0), new KeySymDescriptor("`", true, 1), new KeySymDescriptor("\u00b8", true, 128), new KeySymDescriptor("\u02db", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_BACK_SPACE, new KeyDescriptor(KeyEvent.VK_BACK_SPACE, KeyEvent.VK_BACK_SPACE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0008", false, 0), new KeySymDescriptor("\u0008", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_TAB, new KeyDescriptor(KeyEvent.VK_TAB, KeyEvent.VK_TAB, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\t", false, 0), new KeySymDescriptor("", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_Q, new KeyDescriptor(KeyEvent.VK_Q, KeyEvent.VK_Q, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("q", false, 0), new KeySymDescriptor("Q", false, 1), new KeySymDescriptor("@", false, 128), new KeySymDescriptor("\u03a9", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_W, new KeyDescriptor(KeyEvent.VK_W, KeyEvent.VK_W, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("w", false, 0), new KeySymDescriptor("W", false, 1), new KeySymDescriptor("\u017f", false, 128), new KeySymDescriptor("\u00a7", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_E, new KeyDescriptor(KeyEvent.VK_E, KeyEvent.VK_E, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("e", false, 0), new KeySymDescriptor("E", false, 1), new KeySymDescriptor("\u20ac", false, 128), new KeySymDescriptor("\u20ac", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_R, new KeyDescriptor(KeyEvent.VK_R, KeyEvent.VK_R, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("r", false, 0), new KeySymDescriptor("R", false, 1), new KeySymDescriptor("\u00b6", false, 128), new KeySymDescriptor("\u00ae", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_T, new KeyDescriptor(KeyEvent.VK_T, KeyEvent.VK_T, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("t", false, 0), new KeySymDescriptor("T", false, 1), new KeySymDescriptor("\u0167", false, 128), new KeySymDescriptor("\u0166", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_Y, new KeyDescriptor(KeyEvent.VK_Y, KeyEvent.VK_Z, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("z", false, 0), new KeySymDescriptor("Z", false, 1), new KeySymDescriptor("\u2190", false, 128), new KeySymDescriptor("\u00a5", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_U, new KeyDescriptor(KeyEvent.VK_U, KeyEvent.VK_U, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("u", false, 0), new KeySymDescriptor("U", false, 1), new KeySymDescriptor("\u2193", false, 128), new KeySymDescriptor("\u2191", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_I, new KeyDescriptor(KeyEvent.VK_I, KeyEvent.VK_I, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("i", false, 0), new KeySymDescriptor("I", false, 1), new KeySymDescriptor("\u2192", false, 128), new KeySymDescriptor("\u0131", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_O, new KeyDescriptor(KeyEvent.VK_O, KeyEvent.VK_O, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("o", false, 0), new KeySymDescriptor("O", false, 1), new KeySymDescriptor("\u00f8", false, 128), new KeySymDescriptor("\u00d8", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_P, new KeyDescriptor(KeyEvent.VK_P, KeyEvent.VK_P, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("p", false, 0), new KeySymDescriptor("P", false, 1), new KeySymDescriptor("\u00fe", false, 128), new KeySymDescriptor("\u00de", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_OPEN_BRACKET, new KeyDescriptor(KeyEvent.VK_OPEN_BRACKET, KeyEvent.getExtendedKeyCodeForChar(252), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u00fc", false, 0), new KeySymDescriptor("\u00dc", false, 1), new KeySymDescriptor("\"", true, 128), new KeySymDescriptor("\u00b0", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_CLOSE_BRACKET, new KeyDescriptor(KeyEvent.VK_CLOSE_BRACKET, KeyEvent.VK_PLUS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("+", false, 0), new KeySymDescriptor("*", false, 1), new KeySymDescriptor("~", false, 128), new KeySymDescriptor("\u00af", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_ENTER, new KeyDescriptor(KeyEvent.VK_ENTER, KeyEvent.VK_ENTER, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\r", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_CONTROL, new KeyDescriptor(KeyEvent.VK_CONTROL, KeyEvent.VK_CONTROL, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_A, new KeyDescriptor(KeyEvent.VK_A, KeyEvent.VK_A, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("a", false, 0), new KeySymDescriptor("A", false, 1), new KeySymDescriptor("\u00e6", false, 128), new KeySymDescriptor("\u00c6", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_S, new KeyDescriptor(KeyEvent.VK_S, KeyEvent.VK_S, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("s", false, 0), new KeySymDescriptor("S", false, 1), new KeySymDescriptor("\u017f", false, 128), new KeySymDescriptor("\u1e9e", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_D, new KeyDescriptor(KeyEvent.VK_D, KeyEvent.VK_D, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("d", false, 0), new KeySymDescriptor("D", false, 1), new KeySymDescriptor("\u00f0", false, 128), new KeySymDescriptor("\u00d0", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_F, new KeyDescriptor(KeyEvent.VK_F, KeyEvent.VK_F, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("f", false, 0), new KeySymDescriptor("F", false, 1), new KeySymDescriptor("\u0111", false, 128), new KeySymDescriptor("\u00aa", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_G, new KeyDescriptor(KeyEvent.VK_G, KeyEvent.VK_G, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("g", false, 0), new KeySymDescriptor("G", false, 1), new KeySymDescriptor("\u014b", false, 128), new KeySymDescriptor("\u014a", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_H, new KeyDescriptor(KeyEvent.VK_H, KeyEvent.VK_H, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("h", false, 0), new KeySymDescriptor("H", false, 1), new KeySymDescriptor("\u0127", false, 128), new KeySymDescriptor("\u0126", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_J, new KeyDescriptor(KeyEvent.VK_J, KeyEvent.VK_J, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("j", false, 0), new KeySymDescriptor("J", false, 1), new KeySymDescriptor("\u0323", true, 128), new KeySymDescriptor("\u02d9", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_K, new KeyDescriptor(KeyEvent.VK_K, KeyEvent.VK_K, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("k", false, 0), new KeySymDescriptor("K", false, 1), new KeySymDescriptor("\u0138", false, 128), new KeySymDescriptor("&", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_L, new KeyDescriptor(KeyEvent.VK_L, KeyEvent.VK_L, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("l", false, 0), new KeySymDescriptor("L", false, 1), new KeySymDescriptor("\u0142", false, 128), new KeySymDescriptor("\u0141", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_SEMICOLON, new KeyDescriptor(KeyEvent.VK_SEMICOLON, KeyEvent.getExtendedKeyCodeForChar(246), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u00f6", false, 0), new KeySymDescriptor("\u00d6", false, 1), new KeySymDescriptor("\u02dd", true, 128), new KeySymDescriptor("\u0323", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_QUOTE, new KeyDescriptor(KeyEvent.VK_QUOTE, KeyEvent.getExtendedKeyCodeForChar(228), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u00e4", false, 0), new KeySymDescriptor("\u00c4", false, 1), new KeySymDescriptor("^", true, 128), new KeySymDescriptor("\u02c7", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_BACK_QUOTE, new KeyDescriptor(KeyEvent.VK_BACK_QUOTE, KeyEvent.VK_DEAD_CIRCUMFLEX, KeyEvent.VK_CIRCUMFLEX, List.of(new KeySymDescriptor("^", true, 0), new KeySymDescriptor("\u00b0", false, 1), new KeySymDescriptor("\u2032", false, 128), new KeySymDescriptor("\u2033", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_SHIFT, new KeyDescriptor(KeyEvent.VK_SHIFT, KeyEvent.VK_SHIFT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_BACK_SLASH, new KeyDescriptor(KeyEvent.VK_BACK_SLASH, KeyEvent.VK_NUMBER_SIGN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("#", false, 0), new KeySymDescriptor("'", false, 1), new KeySymDescriptor("\u2019", false, 128), new KeySymDescriptor("\u02d8", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_Z, new KeyDescriptor(KeyEvent.VK_Z, KeyEvent.VK_Y, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("y", false, 0), new KeySymDescriptor("Y", false, 1), new KeySymDescriptor("\u00bb", false, 128), new KeySymDescriptor("\u203a", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_X, new KeyDescriptor(KeyEvent.VK_X, KeyEvent.VK_X, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("x", false, 0), new KeySymDescriptor("X", false, 1), new KeySymDescriptor("\u00ab", false, 128), new KeySymDescriptor("\u2039", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_C, new KeyDescriptor(KeyEvent.VK_C, KeyEvent.VK_C, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("c", false, 0), new KeySymDescriptor("C", false, 1), new KeySymDescriptor("\u00a2", false, 128), new KeySymDescriptor("\u00a9", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_V, new KeyDescriptor(KeyEvent.VK_V, KeyEvent.VK_V, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("v", false, 0), new KeySymDescriptor("V", false, 1), new KeySymDescriptor("\u201e", false, 128), new KeySymDescriptor("\u201a", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_B, new KeyDescriptor(KeyEvent.VK_B, KeyEvent.VK_B, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("b", false, 0), new KeySymDescriptor("B", false, 1), new KeySymDescriptor("\u201c", false, 128), new KeySymDescriptor("\u2018", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_N, new KeyDescriptor(KeyEvent.VK_N, KeyEvent.VK_N, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("n", false, 0), new KeySymDescriptor("N", false, 1), new KeySymDescriptor("\u201d", false, 128), new KeySymDescriptor("\u2019", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_M, new KeyDescriptor(KeyEvent.VK_M, KeyEvent.VK_M, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("m", false, 0), new KeySymDescriptor("M", false, 1), new KeySymDescriptor("\u00b5", false, 128), new KeySymDescriptor("\u00ba", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_COMMA, new KeyDescriptor(KeyEvent.VK_COMMA, KeyEvent.VK_COMMA, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor(",", false, 0), new KeySymDescriptor(";", false, 1), new KeySymDescriptor("\u00b7", false, 128), new KeySymDescriptor("\u00d7", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_PERIOD, new KeyDescriptor(KeyEvent.VK_PERIOD, KeyEvent.VK_PERIOD, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor(".", false, 0), new KeySymDescriptor(":", false, 1), new KeySymDescriptor("\u2026", false, 128), new KeySymDescriptor("\u00f7", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_SLASH, new KeyDescriptor(KeyEvent.VK_SLASH, KeyEvent.VK_MINUS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("-", false, 0), new KeySymDescriptor("_", false, 1), new KeySymDescriptor("\u2013", false, 128), new KeySymDescriptor("\u2014", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_MULTIPLY, new KeyDescriptor(KeyEvent.VK_MULTIPLY, KeyEvent.VK_MULTIPLY, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("*", false, 0), new KeySymDescriptor("*", false, 1), new KeySymDescriptor("*", false, 128), new KeySymDescriptor("*", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_ALT, new KeyDescriptor(KeyEvent.VK_ALT, KeyEvent.VK_ALT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_SPACE, new KeyDescriptor(KeyEvent.VK_SPACE, KeyEvent.VK_SPACE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor(" ", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_CAPS_LOCK, new KeyDescriptor(KeyEvent.VK_CAPS_LOCK, KeyEvent.VK_CAPS_LOCK, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F1, new KeyDescriptor(KeyEvent.VK_F1, KeyEvent.VK_F1, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F2, new KeyDescriptor(KeyEvent.VK_F2, KeyEvent.VK_F2, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F3, new KeyDescriptor(KeyEvent.VK_F3, KeyEvent.VK_F3, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F4, new KeyDescriptor(KeyEvent.VK_F4, KeyEvent.VK_F4, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F5, new KeyDescriptor(KeyEvent.VK_F5, KeyEvent.VK_F5, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F6, new KeyDescriptor(KeyEvent.VK_F6, KeyEvent.VK_F6, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F7, new KeyDescriptor(KeyEvent.VK_F7, KeyEvent.VK_F7, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F8, new KeyDescriptor(KeyEvent.VK_F8, KeyEvent.VK_F8, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F9, new KeyDescriptor(KeyEvent.VK_F9, KeyEvent.VK_F9, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F10, new KeyDescriptor(KeyEvent.VK_F10, KeyEvent.VK_F10, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_NUM_LOCK, new KeyDescriptor(KeyEvent.VK_NUM_LOCK, KeyEvent.VK_NUM_LOCK, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD7, new KeyDescriptor(KeyEvent.VK_NUMPAD7, KeyEvent.VK_HOME, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("7", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD8, new KeyDescriptor(KeyEvent.VK_NUMPAD8, KeyEvent.VK_KP_UP, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("8", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD9, new KeyDescriptor(KeyEvent.VK_NUMPAD9, KeyEvent.VK_PAGE_UP, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("9", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_SUBTRACT, new KeyDescriptor(KeyEvent.VK_SUBTRACT, KeyEvent.VK_SUBTRACT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("-", false, 0), new KeySymDescriptor("-", false, 1), new KeySymDescriptor("-", false, 128), new KeySymDescriptor("-", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD4, new KeyDescriptor(KeyEvent.VK_NUMPAD4, KeyEvent.VK_KP_LEFT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("4", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD5, new KeyDescriptor(KeyEvent.VK_NUMPAD5, KeyEvent.VK_BEGIN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("5", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD6, new KeyDescriptor(KeyEvent.VK_NUMPAD6, KeyEvent.VK_KP_RIGHT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("6", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_ADD, new KeyDescriptor(KeyEvent.VK_ADD, KeyEvent.VK_ADD, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("+", false, 0), new KeySymDescriptor("+", false, 1), new KeySymDescriptor("+", false, 128), new KeySymDescriptor("+", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD1, new KeyDescriptor(KeyEvent.VK_NUMPAD1, KeyEvent.VK_END, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("1", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD2, new KeyDescriptor(KeyEvent.VK_NUMPAD2, KeyEvent.VK_KP_DOWN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("2", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD3, new KeyDescriptor(KeyEvent.VK_NUMPAD3, KeyEvent.VK_PAGE_DOWN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("3", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD0, new KeyDescriptor(KeyEvent.VK_NUMPAD0, KeyEvent.VK_INSERT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("0", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_DECIMAL, new KeyDescriptor(KeyEvent.VK_DECIMAL, KeyEvent.VK_DELETE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor(",", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_LESS, new KeyDescriptor(KeyEvent.VK_LESS, KeyEvent.VK_LESS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("<", false, 0), new KeySymDescriptor(">", false, 1), new KeySymDescriptor("|", false, 128), new KeySymDescriptor("\u0331", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_F11, new KeyDescriptor(KeyEvent.VK_F11, KeyEvent.VK_F11, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F12, new KeyDescriptor(KeyEvent.VK_F12, KeyEvent.VK_F12, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_DIVIDE, new KeyDescriptor(KeyEvent.VK_DIVIDE, KeyEvent.VK_DIVIDE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("/", false, 0), new KeySymDescriptor("/", false, 1), new KeySymDescriptor("/", false, 128), new KeySymDescriptor("/", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_PRINTSCREEN, new KeyDescriptor(KeyEvent.VK_PRINTSCREEN, KeyEvent.VK_PRINTSCREEN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 8))));
|
||||
layout.keys.put(KeyEvent.VK_ALT_GRAPH, new KeyDescriptor(KeyEvent.VK_ALT_GRAPH, KeyEvent.VK_ALT_GRAPH, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_HOME, new KeyDescriptor(KeyEvent.VK_HOME, KeyEvent.VK_HOME, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_UP, new KeyDescriptor(KeyEvent.VK_UP, KeyEvent.VK_UP, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_PAGE_UP, new KeyDescriptor(KeyEvent.VK_PAGE_UP, KeyEvent.VK_PAGE_UP, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_LEFT, new KeyDescriptor(KeyEvent.VK_LEFT, KeyEvent.VK_LEFT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_RIGHT, new KeyDescriptor(KeyEvent.VK_RIGHT, KeyEvent.VK_RIGHT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_END, new KeyDescriptor(KeyEvent.VK_END, KeyEvent.VK_END, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_DOWN, new KeyDescriptor(KeyEvent.VK_DOWN, KeyEvent.VK_DOWN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_PAGE_DOWN, new KeyDescriptor(KeyEvent.VK_PAGE_DOWN, KeyEvent.VK_PAGE_DOWN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_INSERT, new KeyDescriptor(KeyEvent.VK_INSERT, KeyEvent.VK_INSERT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_DELETE, new KeyDescriptor(KeyEvent.VK_DELETE, KeyEvent.VK_DELETE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u007f", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_PAUSE, new KeyDescriptor(KeyEvent.VK_PAUSE, KeyEvent.VK_PAUSE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 4))));
|
||||
layout.keys.put(KeyEvent.VK_META, new KeyDescriptor(KeyEvent.VK_META, KeyEvent.VK_WINDOWS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_WINDOWS, new KeyDescriptor(KeyEvent.VK_WINDOWS, KeyEvent.VK_WINDOWS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F13, new KeyDescriptor(KeyEvent.VK_F13, KeyEvent.VK_F13, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F14, new KeyDescriptor(KeyEvent.VK_F14, KeyEvent.VK_F14, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F15, new KeyDescriptor(KeyEvent.VK_F15, KeyEvent.VK_F15, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F16, new KeyDescriptor(KeyEvent.VK_F16, KeyEvent.VK_F16, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F17, new KeyDescriptor(KeyEvent.VK_F17, KeyEvent.VK_F17, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F18, new KeyDescriptor(KeyEvent.VK_F18, KeyEvent.VK_F18, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F20, new KeyDescriptor(KeyEvent.VK_F20, KeyEvent.VK_F20, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F21, new KeyDescriptor(KeyEvent.VK_F21, KeyEvent.VK_F21, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F22, new KeyDescriptor(KeyEvent.VK_F22, KeyEvent.VK_F22, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F23, new KeyDescriptor(KeyEvent.VK_F23, KeyEvent.VK_F23, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layouts.add(layout);
|
||||
}
|
||||
|
||||
{
|
||||
var layout = new LayoutDescriptor("fr", "", "French", true, new HashMap<>());
|
||||
layout.keys.put(KeyEvent.VK_ESCAPE, new KeyDescriptor(KeyEvent.VK_ESCAPE, KeyEvent.VK_ESCAPE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u001b", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_1, new KeyDescriptor(KeyEvent.VK_1, KeyEvent.VK_AMPERSAND, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("&", false, 0), new KeySymDescriptor("1", false, 1), new KeySymDescriptor("\u00b9", false, 128), new KeySymDescriptor("\u00a1", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_2, new KeyDescriptor(KeyEvent.VK_2, KeyEvent.getExtendedKeyCodeForChar(233), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u00e9", false, 0), new KeySymDescriptor("2", false, 1), new KeySymDescriptor("~", false, 128), new KeySymDescriptor("\u215b", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_3, new KeyDescriptor(KeyEvent.VK_3, KeyEvent.VK_QUOTEDBL, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\"", false, 0), new KeySymDescriptor("3", false, 1), new KeySymDescriptor("#", false, 128), new KeySymDescriptor("\u00a3", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_4, new KeyDescriptor(KeyEvent.VK_4, KeyEvent.VK_QUOTE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("'", false, 0), new KeySymDescriptor("4", false, 1), new KeySymDescriptor("{", false, 128), new KeySymDescriptor("$", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_5, new KeyDescriptor(KeyEvent.VK_5, KeyEvent.VK_LEFT_PARENTHESIS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("(", false, 0), new KeySymDescriptor("5", false, 1), new KeySymDescriptor("[", false, 128), new KeySymDescriptor("\u215c", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_6, new KeyDescriptor(KeyEvent.VK_6, KeyEvent.VK_MINUS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("-", false, 0), new KeySymDescriptor("6", false, 1), new KeySymDescriptor("|", false, 128), new KeySymDescriptor("\u215d", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_7, new KeyDescriptor(KeyEvent.VK_7, KeyEvent.getExtendedKeyCodeForChar(232), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u00e8", false, 0), new KeySymDescriptor("7", false, 1), new KeySymDescriptor("`", false, 128), new KeySymDescriptor("\u215e", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_8, new KeyDescriptor(KeyEvent.VK_8, KeyEvent.VK_UNDERSCORE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("_", false, 0), new KeySymDescriptor("8", false, 1), new KeySymDescriptor("\\", false, 128), new KeySymDescriptor("\u2122", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_9, new KeyDescriptor(KeyEvent.VK_9, KeyEvent.getExtendedKeyCodeForChar(231), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u00e7", false, 0), new KeySymDescriptor("9", false, 1), new KeySymDescriptor("^", false, 128), new KeySymDescriptor("\u00b1", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_0, new KeyDescriptor(KeyEvent.VK_0, KeyEvent.getExtendedKeyCodeForChar(224), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u00e0", false, 0), new KeySymDescriptor("0", false, 1), new KeySymDescriptor("@", false, 128), new KeySymDescriptor("\u00b0", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_MINUS, new KeyDescriptor(KeyEvent.VK_MINUS, KeyEvent.VK_RIGHT_PARENTHESIS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor(")", false, 0), new KeySymDescriptor("\u00b0", false, 1), new KeySymDescriptor("]", false, 128), new KeySymDescriptor("\u00bf", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_EQUALS, new KeyDescriptor(KeyEvent.VK_EQUALS, KeyEvent.VK_EQUALS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("=", false, 0), new KeySymDescriptor("+", false, 1), new KeySymDescriptor("}", false, 128), new KeySymDescriptor("\u02db", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_BACK_SPACE, new KeyDescriptor(KeyEvent.VK_BACK_SPACE, KeyEvent.VK_BACK_SPACE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0008", false, 0), new KeySymDescriptor("\u0008", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_TAB, new KeyDescriptor(KeyEvent.VK_TAB, KeyEvent.VK_TAB, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\t", false, 0), new KeySymDescriptor("", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_Q, new KeyDescriptor(KeyEvent.VK_Q, KeyEvent.VK_A, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("a", false, 0), new KeySymDescriptor("A", false, 1), new KeySymDescriptor("\u00e6", false, 128), new KeySymDescriptor("\u00c6", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_W, new KeyDescriptor(KeyEvent.VK_W, KeyEvent.VK_Z, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("z", false, 0), new KeySymDescriptor("Z", false, 1), new KeySymDescriptor("\u00ab", false, 128), new KeySymDescriptor("<", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_E, new KeyDescriptor(KeyEvent.VK_E, KeyEvent.VK_E, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("e", false, 0), new KeySymDescriptor("E", false, 1), new KeySymDescriptor("\u20ac", false, 128), new KeySymDescriptor("\u00a2", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_R, new KeyDescriptor(KeyEvent.VK_R, KeyEvent.VK_R, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("r", false, 0), new KeySymDescriptor("R", false, 1), new KeySymDescriptor("\u00b6", false, 128), new KeySymDescriptor("\u00ae", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_T, new KeyDescriptor(KeyEvent.VK_T, KeyEvent.VK_T, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("t", false, 0), new KeySymDescriptor("T", false, 1), new KeySymDescriptor("\u0167", false, 128), new KeySymDescriptor("\u0166", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_Y, new KeyDescriptor(KeyEvent.VK_Y, KeyEvent.VK_Y, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("y", false, 0), new KeySymDescriptor("Y", false, 1), new KeySymDescriptor("\u2190", false, 128), new KeySymDescriptor("\u00a5", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_U, new KeyDescriptor(KeyEvent.VK_U, KeyEvent.VK_U, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("u", false, 0), new KeySymDescriptor("U", false, 1), new KeySymDescriptor("\u2193", false, 128), new KeySymDescriptor("\u2191", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_I, new KeyDescriptor(KeyEvent.VK_I, KeyEvent.VK_I, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("i", false, 0), new KeySymDescriptor("I", false, 1), new KeySymDescriptor("\u2192", false, 128), new KeySymDescriptor("\u0131", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_O, new KeyDescriptor(KeyEvent.VK_O, KeyEvent.VK_O, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("o", false, 0), new KeySymDescriptor("O", false, 1), new KeySymDescriptor("\u00f8", false, 128), new KeySymDescriptor("\u00d8", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_P, new KeyDescriptor(KeyEvent.VK_P, KeyEvent.VK_P, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("p", false, 0), new KeySymDescriptor("P", false, 1), new KeySymDescriptor("\u00fe", false, 128), new KeySymDescriptor("\u00de", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_OPEN_BRACKET, new KeyDescriptor(KeyEvent.VK_OPEN_BRACKET, KeyEvent.VK_DEAD_CIRCUMFLEX, KeyEvent.VK_CIRCUMFLEX, List.of(new KeySymDescriptor("^", true, 0), new KeySymDescriptor("\"", true, 1), new KeySymDescriptor("\"", true, 128), new KeySymDescriptor("\u00b0", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_CLOSE_BRACKET, new KeyDescriptor(KeyEvent.VK_CLOSE_BRACKET, KeyEvent.VK_DOLLAR, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("$", false, 0), new KeySymDescriptor("\u00a3", false, 1), new KeySymDescriptor("\u00a4", false, 128), new KeySymDescriptor("\u00af", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_ENTER, new KeyDescriptor(KeyEvent.VK_ENTER, KeyEvent.VK_ENTER, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\r", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_CONTROL, new KeyDescriptor(KeyEvent.VK_CONTROL, KeyEvent.VK_CONTROL, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_A, new KeyDescriptor(KeyEvent.VK_A, KeyEvent.VK_Q, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("q", false, 0), new KeySymDescriptor("Q", false, 1), new KeySymDescriptor("@", false, 128), new KeySymDescriptor("\u03a9", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_S, new KeyDescriptor(KeyEvent.VK_S, KeyEvent.VK_S, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("s", false, 0), new KeySymDescriptor("S", false, 1), new KeySymDescriptor("\u00df", false, 128), new KeySymDescriptor("\u1e9e", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_D, new KeyDescriptor(KeyEvent.VK_D, KeyEvent.VK_D, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("d", false, 0), new KeySymDescriptor("D", false, 1), new KeySymDescriptor("\u00f0", false, 128), new KeySymDescriptor("\u00d0", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_F, new KeyDescriptor(KeyEvent.VK_F, KeyEvent.VK_F, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("f", false, 0), new KeySymDescriptor("F", false, 1), new KeySymDescriptor("\u0111", false, 128), new KeySymDescriptor("\u00aa", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_G, new KeyDescriptor(KeyEvent.VK_G, KeyEvent.VK_G, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("g", false, 0), new KeySymDescriptor("G", false, 1), new KeySymDescriptor("\u014b", false, 128), new KeySymDescriptor("\u014a", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_H, new KeyDescriptor(KeyEvent.VK_H, KeyEvent.VK_H, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("h", false, 0), new KeySymDescriptor("H", false, 1), new KeySymDescriptor("\u0127", false, 128), new KeySymDescriptor("\u0126", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_J, new KeyDescriptor(KeyEvent.VK_J, KeyEvent.VK_J, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("j", false, 0), new KeySymDescriptor("J", false, 1), new KeySymDescriptor("\u0309", true, 128), new KeySymDescriptor("\u031b", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_K, new KeyDescriptor(KeyEvent.VK_K, KeyEvent.VK_K, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("k", false, 0), new KeySymDescriptor("K", false, 1), new KeySymDescriptor("\u0138", false, 128), new KeySymDescriptor("&", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_L, new KeyDescriptor(KeyEvent.VK_L, KeyEvent.VK_L, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("l", false, 0), new KeySymDescriptor("L", false, 1), new KeySymDescriptor("\u0142", false, 128), new KeySymDescriptor("\u0141", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_SEMICOLON, new KeyDescriptor(KeyEvent.VK_SEMICOLON, KeyEvent.VK_M, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("m", false, 0), new KeySymDescriptor("M", false, 1), new KeySymDescriptor("\u00b5", false, 128), new KeySymDescriptor("\u00ba", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_QUOTE, new KeyDescriptor(KeyEvent.VK_QUOTE, KeyEvent.getExtendedKeyCodeForChar(249), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u00f9", false, 0), new KeySymDescriptor("%", false, 1), new KeySymDescriptor("^", true, 128), new KeySymDescriptor("\u02c7", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_BACK_QUOTE, new KeyDescriptor(KeyEvent.VK_BACK_QUOTE, KeyEvent.getExtendedKeyCodeForChar(178), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u00b2", false, 0), new KeySymDescriptor("~", false, 1), new KeySymDescriptor("\u00ac", false, 128), new KeySymDescriptor("\u00ac", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_SHIFT, new KeyDescriptor(KeyEvent.VK_SHIFT, KeyEvent.VK_SHIFT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_BACK_SLASH, new KeyDescriptor(KeyEvent.VK_BACK_SLASH, KeyEvent.VK_ASTERISK, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("*", false, 0), new KeySymDescriptor("\u00b5", false, 1), new KeySymDescriptor("`", true, 128), new KeySymDescriptor("\u02d8", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_Z, new KeyDescriptor(KeyEvent.VK_Z, KeyEvent.VK_W, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("w", false, 0), new KeySymDescriptor("W", false, 1), new KeySymDescriptor("\u0142", false, 128), new KeySymDescriptor("\u0141", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_X, new KeyDescriptor(KeyEvent.VK_X, KeyEvent.VK_X, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("x", false, 0), new KeySymDescriptor("X", false, 1), new KeySymDescriptor("\u00bb", false, 128), new KeySymDescriptor(">", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_C, new KeyDescriptor(KeyEvent.VK_C, KeyEvent.VK_C, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("c", false, 0), new KeySymDescriptor("C", false, 1), new KeySymDescriptor("\u00a2", false, 128), new KeySymDescriptor("\u00a9", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_V, new KeyDescriptor(KeyEvent.VK_V, KeyEvent.VK_V, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("v", false, 0), new KeySymDescriptor("V", false, 1), new KeySymDescriptor("\u201e", false, 128), new KeySymDescriptor("\u201a", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_B, new KeyDescriptor(KeyEvent.VK_B, KeyEvent.VK_B, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("b", false, 0), new KeySymDescriptor("B", false, 1), new KeySymDescriptor("\u201c", false, 128), new KeySymDescriptor("\u2018", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_N, new KeyDescriptor(KeyEvent.VK_N, KeyEvent.VK_N, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("n", false, 0), new KeySymDescriptor("N", false, 1), new KeySymDescriptor("\u201d", false, 128), new KeySymDescriptor("\u2019", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_M, new KeyDescriptor(KeyEvent.VK_M, KeyEvent.VK_COMMA, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor(",", false, 0), new KeySymDescriptor("?", false, 1), new KeySymDescriptor("'", true, 128), new KeySymDescriptor("\u02dd", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_COMMA, new KeyDescriptor(KeyEvent.VK_COMMA, KeyEvent.VK_SEMICOLON, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor(";", false, 0), new KeySymDescriptor(".", false, 1), new KeySymDescriptor("\u2022", false, 128), new KeySymDescriptor("\u00d7", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_PERIOD, new KeyDescriptor(KeyEvent.VK_PERIOD, KeyEvent.VK_COLON, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor(":", false, 0), new KeySymDescriptor("/", false, 1), new KeySymDescriptor("\u00b7", false, 128), new KeySymDescriptor("\u00f7", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_SLASH, new KeyDescriptor(KeyEvent.VK_SLASH, KeyEvent.VK_EXCLAMATION_MARK, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("!", false, 0), new KeySymDescriptor("\u00a7", false, 1), new KeySymDescriptor("\u0323", true, 128), new KeySymDescriptor("\u02d9", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_MULTIPLY, new KeyDescriptor(KeyEvent.VK_MULTIPLY, KeyEvent.VK_MULTIPLY, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("*", false, 0), new KeySymDescriptor("*", false, 1), new KeySymDescriptor("*", false, 128), new KeySymDescriptor("*", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_ALT, new KeyDescriptor(KeyEvent.VK_ALT, KeyEvent.VK_ALT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_SPACE, new KeyDescriptor(KeyEvent.VK_SPACE, KeyEvent.VK_SPACE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor(" ", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_CAPS_LOCK, new KeyDescriptor(KeyEvent.VK_CAPS_LOCK, KeyEvent.VK_CAPS_LOCK, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F1, new KeyDescriptor(KeyEvent.VK_F1, KeyEvent.VK_F1, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F2, new KeyDescriptor(KeyEvent.VK_F2, KeyEvent.VK_F2, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F3, new KeyDescriptor(KeyEvent.VK_F3, KeyEvent.VK_F3, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F4, new KeyDescriptor(KeyEvent.VK_F4, KeyEvent.VK_F4, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F5, new KeyDescriptor(KeyEvent.VK_F5, KeyEvent.VK_F5, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F6, new KeyDescriptor(KeyEvent.VK_F6, KeyEvent.VK_F6, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F7, new KeyDescriptor(KeyEvent.VK_F7, KeyEvent.VK_F7, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F8, new KeyDescriptor(KeyEvent.VK_F8, KeyEvent.VK_F8, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F9, new KeyDescriptor(KeyEvent.VK_F9, KeyEvent.VK_F9, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F10, new KeyDescriptor(KeyEvent.VK_F10, KeyEvent.VK_F10, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_NUM_LOCK, new KeyDescriptor(KeyEvent.VK_NUM_LOCK, KeyEvent.VK_NUM_LOCK, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD7, new KeyDescriptor(KeyEvent.VK_NUMPAD7, KeyEvent.VK_HOME, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("7", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD8, new KeyDescriptor(KeyEvent.VK_NUMPAD8, KeyEvent.VK_KP_UP, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("8", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD9, new KeyDescriptor(KeyEvent.VK_NUMPAD9, KeyEvent.VK_PAGE_UP, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("9", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_SUBTRACT, new KeyDescriptor(KeyEvent.VK_SUBTRACT, KeyEvent.VK_SUBTRACT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("-", false, 0), new KeySymDescriptor("-", false, 1), new KeySymDescriptor("-", false, 128), new KeySymDescriptor("-", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD4, new KeyDescriptor(KeyEvent.VK_NUMPAD4, KeyEvent.VK_KP_LEFT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("4", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD5, new KeyDescriptor(KeyEvent.VK_NUMPAD5, KeyEvent.VK_BEGIN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("5", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD6, new KeyDescriptor(KeyEvent.VK_NUMPAD6, KeyEvent.VK_KP_RIGHT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("6", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_ADD, new KeyDescriptor(KeyEvent.VK_ADD, KeyEvent.VK_ADD, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("+", false, 0), new KeySymDescriptor("+", false, 1), new KeySymDescriptor("+", false, 128), new KeySymDescriptor("+", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD1, new KeyDescriptor(KeyEvent.VK_NUMPAD1, KeyEvent.VK_END, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("1", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD2, new KeyDescriptor(KeyEvent.VK_NUMPAD2, KeyEvent.VK_KP_DOWN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("2", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD3, new KeyDescriptor(KeyEvent.VK_NUMPAD3, KeyEvent.VK_PAGE_DOWN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("3", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD0, new KeyDescriptor(KeyEvent.VK_NUMPAD0, KeyEvent.VK_INSERT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("0", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_DECIMAL, new KeyDescriptor(KeyEvent.VK_DECIMAL, KeyEvent.VK_DELETE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor(".", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_LESS, new KeyDescriptor(KeyEvent.VK_LESS, KeyEvent.VK_LESS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("<", false, 0), new KeySymDescriptor(">", false, 1), new KeySymDescriptor("|", false, 128), new KeySymDescriptor("\u00a6", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_F11, new KeyDescriptor(KeyEvent.VK_F11, KeyEvent.VK_F11, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F12, new KeyDescriptor(KeyEvent.VK_F12, KeyEvent.VK_F12, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_DIVIDE, new KeyDescriptor(KeyEvent.VK_DIVIDE, KeyEvent.VK_DIVIDE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("/", false, 0), new KeySymDescriptor("/", false, 1), new KeySymDescriptor("/", false, 128), new KeySymDescriptor("/", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_PRINTSCREEN, new KeyDescriptor(KeyEvent.VK_PRINTSCREEN, KeyEvent.VK_PRINTSCREEN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 8))));
|
||||
layout.keys.put(KeyEvent.VK_ALT_GRAPH, new KeyDescriptor(KeyEvent.VK_ALT_GRAPH, KeyEvent.VK_ALT_GRAPH, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_HOME, new KeyDescriptor(KeyEvent.VK_HOME, KeyEvent.VK_HOME, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_UP, new KeyDescriptor(KeyEvent.VK_UP, KeyEvent.VK_UP, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_PAGE_UP, new KeyDescriptor(KeyEvent.VK_PAGE_UP, KeyEvent.VK_PAGE_UP, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_LEFT, new KeyDescriptor(KeyEvent.VK_LEFT, KeyEvent.VK_LEFT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_RIGHT, new KeyDescriptor(KeyEvent.VK_RIGHT, KeyEvent.VK_RIGHT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_END, new KeyDescriptor(KeyEvent.VK_END, KeyEvent.VK_END, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_DOWN, new KeyDescriptor(KeyEvent.VK_DOWN, KeyEvent.VK_DOWN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_PAGE_DOWN, new KeyDescriptor(KeyEvent.VK_PAGE_DOWN, KeyEvent.VK_PAGE_DOWN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_INSERT, new KeyDescriptor(KeyEvent.VK_INSERT, KeyEvent.VK_INSERT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_DELETE, new KeyDescriptor(KeyEvent.VK_DELETE, KeyEvent.VK_DELETE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u007f", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_PAUSE, new KeyDescriptor(KeyEvent.VK_PAUSE, KeyEvent.VK_PAUSE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 4))));
|
||||
layout.keys.put(KeyEvent.VK_META, new KeyDescriptor(KeyEvent.VK_META, KeyEvent.VK_WINDOWS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_WINDOWS, new KeyDescriptor(KeyEvent.VK_WINDOWS, KeyEvent.VK_WINDOWS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F13, new KeyDescriptor(KeyEvent.VK_F13, KeyEvent.VK_F13, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F14, new KeyDescriptor(KeyEvent.VK_F14, KeyEvent.VK_F14, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F15, new KeyDescriptor(KeyEvent.VK_F15, KeyEvent.VK_F15, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F16, new KeyDescriptor(KeyEvent.VK_F16, KeyEvent.VK_F16, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F17, new KeyDescriptor(KeyEvent.VK_F17, KeyEvent.VK_F17, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F18, new KeyDescriptor(KeyEvent.VK_F18, KeyEvent.VK_F18, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F20, new KeyDescriptor(KeyEvent.VK_F20, KeyEvent.VK_F20, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F21, new KeyDescriptor(KeyEvent.VK_F21, KeyEvent.VK_F21, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F22, new KeyDescriptor(KeyEvent.VK_F22, KeyEvent.VK_F22, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F23, new KeyDescriptor(KeyEvent.VK_F23, KeyEvent.VK_F23, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layouts.add(layout);
|
||||
}
|
||||
|
||||
{
|
||||
var layout = new LayoutDescriptor("es", "", "Spanish", true, new HashMap<>());
|
||||
layout.keys.put(KeyEvent.VK_ESCAPE, new KeyDescriptor(KeyEvent.VK_ESCAPE, KeyEvent.VK_ESCAPE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u001b", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_1, new KeyDescriptor(KeyEvent.VK_1, KeyEvent.VK_1, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("1", false, 0), new KeySymDescriptor("!", false, 1), new KeySymDescriptor("|", false, 128), new KeySymDescriptor("\u00a1", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_2, new KeyDescriptor(KeyEvent.VK_2, KeyEvent.VK_2, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("2", false, 0), new KeySymDescriptor("\"", false, 1), new KeySymDescriptor("@", false, 128), new KeySymDescriptor("\u215b", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_3, new KeyDescriptor(KeyEvent.VK_3, KeyEvent.VK_3, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("3", false, 0), new KeySymDescriptor("\u00b7", false, 1), new KeySymDescriptor("#", false, 128), new KeySymDescriptor("\u00a3", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_4, new KeyDescriptor(KeyEvent.VK_4, KeyEvent.VK_4, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("4", false, 0), new KeySymDescriptor("$", false, 1), new KeySymDescriptor("~", false, 128), new KeySymDescriptor("$", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_5, new KeyDescriptor(KeyEvent.VK_5, KeyEvent.VK_5, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("5", false, 0), new KeySymDescriptor("%", false, 1), new KeySymDescriptor("\u00bd", false, 128), new KeySymDescriptor("\u215c", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_6, new KeyDescriptor(KeyEvent.VK_6, KeyEvent.VK_6, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("6", false, 0), new KeySymDescriptor("&", false, 1), new KeySymDescriptor("\u00ac", false, 128), new KeySymDescriptor("\u215d", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_7, new KeyDescriptor(KeyEvent.VK_7, KeyEvent.VK_7, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("7", false, 0), new KeySymDescriptor("/", false, 1), new KeySymDescriptor("{", false, 128), new KeySymDescriptor("\u215e", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_8, new KeyDescriptor(KeyEvent.VK_8, KeyEvent.VK_8, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("8", false, 0), new KeySymDescriptor("(", false, 1), new KeySymDescriptor("[", false, 128), new KeySymDescriptor("\u2122", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_9, new KeyDescriptor(KeyEvent.VK_9, KeyEvent.VK_9, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("9", false, 0), new KeySymDescriptor(")", false, 1), new KeySymDescriptor("]", false, 128), new KeySymDescriptor("\u00b1", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_0, new KeyDescriptor(KeyEvent.VK_0, KeyEvent.VK_0, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("0", false, 0), new KeySymDescriptor("=", false, 1), new KeySymDescriptor("}", false, 128), new KeySymDescriptor("\u00b0", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_MINUS, new KeyDescriptor(KeyEvent.VK_MINUS, KeyEvent.VK_QUOTE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("'", false, 0), new KeySymDescriptor("?", false, 1), new KeySymDescriptor("\\", false, 128), new KeySymDescriptor("\u00bf", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_EQUALS, new KeyDescriptor(KeyEvent.VK_EQUALS, KeyEvent.VK_INVERTED_EXCLAMATION_MARK, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u00a1", false, 0), new KeySymDescriptor("\u00bf", false, 1), new KeySymDescriptor("\u00b8", true, 128), new KeySymDescriptor("\u02db", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_BACK_SPACE, new KeyDescriptor(KeyEvent.VK_BACK_SPACE, KeyEvent.VK_BACK_SPACE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0008", false, 0), new KeySymDescriptor("\u0008", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_TAB, new KeyDescriptor(KeyEvent.VK_TAB, KeyEvent.VK_TAB, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\t", false, 0), new KeySymDescriptor("", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_Q, new KeyDescriptor(KeyEvent.VK_Q, KeyEvent.VK_Q, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("q", false, 0), new KeySymDescriptor("Q", false, 1), new KeySymDescriptor("@", false, 128), new KeySymDescriptor("\u03a9", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_W, new KeyDescriptor(KeyEvent.VK_W, KeyEvent.VK_W, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("w", false, 0), new KeySymDescriptor("W", false, 1), new KeySymDescriptor("\u017f", false, 128), new KeySymDescriptor("\u00a7", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_E, new KeyDescriptor(KeyEvent.VK_E, KeyEvent.VK_E, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("e", false, 0), new KeySymDescriptor("E", false, 1), new KeySymDescriptor("\u20ac", false, 128), new KeySymDescriptor("\u00a2", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_R, new KeyDescriptor(KeyEvent.VK_R, KeyEvent.VK_R, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("r", false, 0), new KeySymDescriptor("R", false, 1), new KeySymDescriptor("\u00b6", false, 128), new KeySymDescriptor("\u00ae", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_T, new KeyDescriptor(KeyEvent.VK_T, KeyEvent.VK_T, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("t", false, 0), new KeySymDescriptor("T", false, 1), new KeySymDescriptor("\u0167", false, 128), new KeySymDescriptor("\u0166", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_Y, new KeyDescriptor(KeyEvent.VK_Y, KeyEvent.VK_Y, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("y", false, 0), new KeySymDescriptor("Y", false, 1), new KeySymDescriptor("\u2190", false, 128), new KeySymDescriptor("\u00a5", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_U, new KeyDescriptor(KeyEvent.VK_U, KeyEvent.VK_U, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("u", false, 0), new KeySymDescriptor("U", false, 1), new KeySymDescriptor("\u2193", false, 128), new KeySymDescriptor("\u2191", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_I, new KeyDescriptor(KeyEvent.VK_I, KeyEvent.VK_I, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("i", false, 0), new KeySymDescriptor("I", false, 1), new KeySymDescriptor("\u2192", false, 128), new KeySymDescriptor("\u0131", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_O, new KeyDescriptor(KeyEvent.VK_O, KeyEvent.VK_O, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("o", false, 0), new KeySymDescriptor("O", false, 1), new KeySymDescriptor("\u00f8", false, 128), new KeySymDescriptor("\u00d8", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_P, new KeyDescriptor(KeyEvent.VK_P, KeyEvent.VK_P, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("p", false, 0), new KeySymDescriptor("P", false, 1), new KeySymDescriptor("\u00fe", false, 128), new KeySymDescriptor("\u00de", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_OPEN_BRACKET, new KeyDescriptor(KeyEvent.VK_OPEN_BRACKET, KeyEvent.VK_DEAD_GRAVE, KeyEvent.VK_BACK_QUOTE, List.of(new KeySymDescriptor("`", true, 0), new KeySymDescriptor("^", true, 1), new KeySymDescriptor("[", false, 128), new KeySymDescriptor("\u00b0", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_CLOSE_BRACKET, new KeyDescriptor(KeyEvent.VK_CLOSE_BRACKET, KeyEvent.VK_PLUS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("+", false, 0), new KeySymDescriptor("*", false, 1), new KeySymDescriptor("]", false, 128), new KeySymDescriptor("\u00af", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_ENTER, new KeyDescriptor(KeyEvent.VK_ENTER, KeyEvent.VK_ENTER, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\r", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_CONTROL, new KeyDescriptor(KeyEvent.VK_CONTROL, KeyEvent.VK_CONTROL, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_A, new KeyDescriptor(KeyEvent.VK_A, KeyEvent.VK_A, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("a", false, 0), new KeySymDescriptor("A", false, 1), new KeySymDescriptor("\u00e6", false, 128), new KeySymDescriptor("\u00c6", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_S, new KeyDescriptor(KeyEvent.VK_S, KeyEvent.VK_S, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("s", false, 0), new KeySymDescriptor("S", false, 1), new KeySymDescriptor("\u00df", false, 128), new KeySymDescriptor("\u1e9e", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_D, new KeyDescriptor(KeyEvent.VK_D, KeyEvent.VK_D, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("d", false, 0), new KeySymDescriptor("D", false, 1), new KeySymDescriptor("\u00f0", false, 128), new KeySymDescriptor("\u00d0", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_F, new KeyDescriptor(KeyEvent.VK_F, KeyEvent.VK_F, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("f", false, 0), new KeySymDescriptor("F", false, 1), new KeySymDescriptor("\u0111", false, 128), new KeySymDescriptor("\u00aa", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_G, new KeyDescriptor(KeyEvent.VK_G, KeyEvent.VK_G, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("g", false, 0), new KeySymDescriptor("G", false, 1), new KeySymDescriptor("\u014b", false, 128), new KeySymDescriptor("\u014a", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_H, new KeyDescriptor(KeyEvent.VK_H, KeyEvent.VK_H, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("h", false, 0), new KeySymDescriptor("H", false, 1), new KeySymDescriptor("\u0127", false, 128), new KeySymDescriptor("\u0126", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_J, new KeyDescriptor(KeyEvent.VK_J, KeyEvent.VK_J, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("j", false, 0), new KeySymDescriptor("J", false, 1), new KeySymDescriptor("\u0309", true, 128), new KeySymDescriptor("\u031b", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_K, new KeyDescriptor(KeyEvent.VK_K, KeyEvent.VK_K, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("k", false, 0), new KeySymDescriptor("K", false, 1), new KeySymDescriptor("\u0138", false, 128), new KeySymDescriptor("&", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_L, new KeyDescriptor(KeyEvent.VK_L, KeyEvent.VK_L, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("l", false, 0), new KeySymDescriptor("L", false, 1), new KeySymDescriptor("\u0142", false, 128), new KeySymDescriptor("\u0141", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_SEMICOLON, new KeyDescriptor(KeyEvent.VK_SEMICOLON, KeyEvent.getExtendedKeyCodeForChar(241), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u00f1", false, 0), new KeySymDescriptor("\u00d1", false, 1), new KeySymDescriptor("~", true, 128), new KeySymDescriptor("\u02dd", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_QUOTE, new KeyDescriptor(KeyEvent.VK_QUOTE, KeyEvent.VK_DEAD_ACUTE, KeyEvent.VK_QUOTE, List.of(new KeySymDescriptor("'", true, 0), new KeySymDescriptor("\"", true, 1), new KeySymDescriptor("{", false, 128), new KeySymDescriptor("\u02c7", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_BACK_QUOTE, new KeyDescriptor(KeyEvent.VK_BACK_QUOTE, KeyEvent.getExtendedKeyCodeForChar(186), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u00ba", false, 0), new KeySymDescriptor("\u00aa", false, 1), new KeySymDescriptor("\\", false, 128), new KeySymDescriptor("\\", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_SHIFT, new KeyDescriptor(KeyEvent.VK_SHIFT, KeyEvent.VK_SHIFT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_BACK_SLASH, new KeyDescriptor(KeyEvent.VK_BACK_SLASH, KeyEvent.getExtendedKeyCodeForChar(231), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u00e7", false, 0), new KeySymDescriptor("\u00c7", false, 1), new KeySymDescriptor("}", false, 128), new KeySymDescriptor("\u02d8", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_Z, new KeyDescriptor(KeyEvent.VK_Z, KeyEvent.VK_Z, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("z", false, 0), new KeySymDescriptor("Z", false, 1), new KeySymDescriptor("\u00ab", false, 128), new KeySymDescriptor("<", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_X, new KeyDescriptor(KeyEvent.VK_X, KeyEvent.VK_X, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("x", false, 0), new KeySymDescriptor("X", false, 1), new KeySymDescriptor("\u00bb", false, 128), new KeySymDescriptor(">", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_C, new KeyDescriptor(KeyEvent.VK_C, KeyEvent.VK_C, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("c", false, 0), new KeySymDescriptor("C", false, 1), new KeySymDescriptor("\u00a2", false, 128), new KeySymDescriptor("\u00a9", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_V, new KeyDescriptor(KeyEvent.VK_V, KeyEvent.VK_V, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("v", false, 0), new KeySymDescriptor("V", false, 1), new KeySymDescriptor("\u201e", false, 128), new KeySymDescriptor("\u201a", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_B, new KeyDescriptor(KeyEvent.VK_B, KeyEvent.VK_B, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("b", false, 0), new KeySymDescriptor("B", false, 1), new KeySymDescriptor("\u201c", false, 128), new KeySymDescriptor("\u2018", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_N, new KeyDescriptor(KeyEvent.VK_N, KeyEvent.VK_N, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("n", false, 0), new KeySymDescriptor("N", false, 1), new KeySymDescriptor("\u201d", false, 128), new KeySymDescriptor("\u2019", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_M, new KeyDescriptor(KeyEvent.VK_M, KeyEvent.VK_M, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("m", false, 0), new KeySymDescriptor("M", false, 1), new KeySymDescriptor("\u00b5", false, 128), new KeySymDescriptor("\u00ba", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_COMMA, new KeyDescriptor(KeyEvent.VK_COMMA, KeyEvent.VK_COMMA, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor(",", false, 0), new KeySymDescriptor(";", false, 1), new KeySymDescriptor("\u2022", false, 128), new KeySymDescriptor("\u00d7", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_PERIOD, new KeyDescriptor(KeyEvent.VK_PERIOD, KeyEvent.VK_PERIOD, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor(".", false, 0), new KeySymDescriptor(":", false, 1), new KeySymDescriptor("\u00b7", false, 128), new KeySymDescriptor("\u00f7", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_SLASH, new KeyDescriptor(KeyEvent.VK_SLASH, KeyEvent.VK_MINUS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("-", false, 0), new KeySymDescriptor("_", false, 1), new KeySymDescriptor("\u0323", true, 128), new KeySymDescriptor("\u02d9", true, 129))));
|
||||
layout.keys.put(KeyEvent.VK_MULTIPLY, new KeyDescriptor(KeyEvent.VK_MULTIPLY, KeyEvent.VK_MULTIPLY, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("*", false, 0), new KeySymDescriptor("*", false, 1), new KeySymDescriptor("*", false, 128), new KeySymDescriptor("*", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_ALT, new KeyDescriptor(KeyEvent.VK_ALT, KeyEvent.VK_ALT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_SPACE, new KeyDescriptor(KeyEvent.VK_SPACE, KeyEvent.VK_SPACE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor(" ", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_CAPS_LOCK, new KeyDescriptor(KeyEvent.VK_CAPS_LOCK, KeyEvent.VK_CAPS_LOCK, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F1, new KeyDescriptor(KeyEvent.VK_F1, KeyEvent.VK_F1, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F2, new KeyDescriptor(KeyEvent.VK_F2, KeyEvent.VK_F2, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F3, new KeyDescriptor(KeyEvent.VK_F3, KeyEvent.VK_F3, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F4, new KeyDescriptor(KeyEvent.VK_F4, KeyEvent.VK_F4, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F5, new KeyDescriptor(KeyEvent.VK_F5, KeyEvent.VK_F5, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F6, new KeyDescriptor(KeyEvent.VK_F6, KeyEvent.VK_F6, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F7, new KeyDescriptor(KeyEvent.VK_F7, KeyEvent.VK_F7, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F8, new KeyDescriptor(KeyEvent.VK_F8, KeyEvent.VK_F8, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F9, new KeyDescriptor(KeyEvent.VK_F9, KeyEvent.VK_F9, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F10, new KeyDescriptor(KeyEvent.VK_F10, KeyEvent.VK_F10, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_NUM_LOCK, new KeyDescriptor(KeyEvent.VK_NUM_LOCK, KeyEvent.VK_NUM_LOCK, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD7, new KeyDescriptor(KeyEvent.VK_NUMPAD7, KeyEvent.VK_HOME, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("7", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD8, new KeyDescriptor(KeyEvent.VK_NUMPAD8, KeyEvent.VK_KP_UP, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("8", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD9, new KeyDescriptor(KeyEvent.VK_NUMPAD9, KeyEvent.VK_PAGE_UP, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("9", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_SUBTRACT, new KeyDescriptor(KeyEvent.VK_SUBTRACT, KeyEvent.VK_SUBTRACT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("-", false, 0), new KeySymDescriptor("-", false, 1), new KeySymDescriptor("-", false, 128), new KeySymDescriptor("-", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD4, new KeyDescriptor(KeyEvent.VK_NUMPAD4, KeyEvent.VK_KP_LEFT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("4", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD5, new KeyDescriptor(KeyEvent.VK_NUMPAD5, KeyEvent.VK_BEGIN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("5", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD6, new KeyDescriptor(KeyEvent.VK_NUMPAD6, KeyEvent.VK_KP_RIGHT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("6", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_ADD, new KeyDescriptor(KeyEvent.VK_ADD, KeyEvent.VK_ADD, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("+", false, 0), new KeySymDescriptor("+", false, 1), new KeySymDescriptor("+", false, 128), new KeySymDescriptor("+", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD1, new KeyDescriptor(KeyEvent.VK_NUMPAD1, KeyEvent.VK_END, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("1", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD2, new KeyDescriptor(KeyEvent.VK_NUMPAD2, KeyEvent.VK_KP_DOWN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("2", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD3, new KeyDescriptor(KeyEvent.VK_NUMPAD3, KeyEvent.VK_PAGE_DOWN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("3", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD0, new KeyDescriptor(KeyEvent.VK_NUMPAD0, KeyEvent.VK_INSERT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("0", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_DECIMAL, new KeyDescriptor(KeyEvent.VK_DECIMAL, KeyEvent.VK_DELETE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor(".", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_LESS, new KeyDescriptor(KeyEvent.VK_LESS, KeyEvent.VK_LESS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("<", false, 0), new KeySymDescriptor(">", false, 1), new KeySymDescriptor("|", false, 128), new KeySymDescriptor("\u00a6", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_F11, new KeyDescriptor(KeyEvent.VK_F11, KeyEvent.VK_F11, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F12, new KeyDescriptor(KeyEvent.VK_F12, KeyEvent.VK_F12, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_DIVIDE, new KeyDescriptor(KeyEvent.VK_DIVIDE, KeyEvent.VK_DIVIDE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("/", false, 0), new KeySymDescriptor("/", false, 1), new KeySymDescriptor("/", false, 128), new KeySymDescriptor("/", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_PRINTSCREEN, new KeyDescriptor(KeyEvent.VK_PRINTSCREEN, KeyEvent.VK_PRINTSCREEN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 8))));
|
||||
layout.keys.put(KeyEvent.VK_ALT_GRAPH, new KeyDescriptor(KeyEvent.VK_ALT_GRAPH, KeyEvent.VK_ALT_GRAPH, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_HOME, new KeyDescriptor(KeyEvent.VK_HOME, KeyEvent.VK_HOME, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_UP, new KeyDescriptor(KeyEvent.VK_UP, KeyEvent.VK_UP, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_PAGE_UP, new KeyDescriptor(KeyEvent.VK_PAGE_UP, KeyEvent.VK_PAGE_UP, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_LEFT, new KeyDescriptor(KeyEvent.VK_LEFT, KeyEvent.VK_LEFT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_RIGHT, new KeyDescriptor(KeyEvent.VK_RIGHT, KeyEvent.VK_RIGHT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_END, new KeyDescriptor(KeyEvent.VK_END, KeyEvent.VK_END, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_DOWN, new KeyDescriptor(KeyEvent.VK_DOWN, KeyEvent.VK_DOWN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_PAGE_DOWN, new KeyDescriptor(KeyEvent.VK_PAGE_DOWN, KeyEvent.VK_PAGE_DOWN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_INSERT, new KeyDescriptor(KeyEvent.VK_INSERT, KeyEvent.VK_INSERT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_DELETE, new KeyDescriptor(KeyEvent.VK_DELETE, KeyEvent.VK_DELETE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u007f", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_PAUSE, new KeyDescriptor(KeyEvent.VK_PAUSE, KeyEvent.VK_PAUSE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 4))));
|
||||
layout.keys.put(KeyEvent.VK_META, new KeyDescriptor(KeyEvent.VK_META, KeyEvent.VK_WINDOWS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_WINDOWS, new KeyDescriptor(KeyEvent.VK_WINDOWS, KeyEvent.VK_WINDOWS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F13, new KeyDescriptor(KeyEvent.VK_F13, KeyEvent.VK_F13, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F14, new KeyDescriptor(KeyEvent.VK_F14, KeyEvent.VK_F14, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F15, new KeyDescriptor(KeyEvent.VK_F15, KeyEvent.VK_F15, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F16, new KeyDescriptor(KeyEvent.VK_F16, KeyEvent.VK_F16, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F17, new KeyDescriptor(KeyEvent.VK_F17, KeyEvent.VK_F17, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F18, new KeyDescriptor(KeyEvent.VK_F18, KeyEvent.VK_F18, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F20, new KeyDescriptor(KeyEvent.VK_F20, KeyEvent.VK_F20, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F21, new KeyDescriptor(KeyEvent.VK_F21, KeyEvent.VK_F21, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F22, new KeyDescriptor(KeyEvent.VK_F22, KeyEvent.VK_F22, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F23, new KeyDescriptor(KeyEvent.VK_F23, KeyEvent.VK_F23, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layouts.add(layout);
|
||||
}
|
||||
|
||||
{
|
||||
var layout = new LayoutDescriptor("ru", "", "Russian", false, new HashMap<>());
|
||||
layout.keys.put(KeyEvent.VK_ESCAPE, new KeyDescriptor(KeyEvent.VK_ESCAPE, KeyEvent.VK_ESCAPE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u001b", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_1, new KeyDescriptor(KeyEvent.VK_1, KeyEvent.VK_1, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("1", false, 0), new KeySymDescriptor("!", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_2, new KeyDescriptor(KeyEvent.VK_2, KeyEvent.VK_2, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("2", false, 0), new KeySymDescriptor("\"", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_3, new KeyDescriptor(KeyEvent.VK_3, KeyEvent.VK_3, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("3", false, 0), new KeySymDescriptor("\u2116", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_4, new KeyDescriptor(KeyEvent.VK_4, KeyEvent.VK_4, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("4", false, 0), new KeySymDescriptor(";", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_5, new KeyDescriptor(KeyEvent.VK_5, KeyEvent.VK_5, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("5", false, 0), new KeySymDescriptor("%", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_6, new KeyDescriptor(KeyEvent.VK_6, KeyEvent.VK_6, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("6", false, 0), new KeySymDescriptor(":", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_7, new KeyDescriptor(KeyEvent.VK_7, KeyEvent.VK_7, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("7", false, 0), new KeySymDescriptor("?", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_8, new KeyDescriptor(KeyEvent.VK_8, KeyEvent.VK_8, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("8", false, 0), new KeySymDescriptor("*", false, 1), new KeySymDescriptor("\u20bd", false, 128))));
|
||||
layout.keys.put(KeyEvent.VK_9, new KeyDescriptor(KeyEvent.VK_9, KeyEvent.VK_9, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("9", false, 0), new KeySymDescriptor("(", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_0, new KeyDescriptor(KeyEvent.VK_0, KeyEvent.VK_0, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("0", false, 0), new KeySymDescriptor(")", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_MINUS, new KeyDescriptor(KeyEvent.VK_MINUS, KeyEvent.VK_MINUS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("-", false, 0), new KeySymDescriptor("_", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_EQUALS, new KeyDescriptor(KeyEvent.VK_EQUALS, KeyEvent.VK_EQUALS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("=", false, 0), new KeySymDescriptor("+", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_BACK_SPACE, new KeyDescriptor(KeyEvent.VK_BACK_SPACE, KeyEvent.VK_BACK_SPACE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0008", false, 0), new KeySymDescriptor("\u0008", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_TAB, new KeyDescriptor(KeyEvent.VK_TAB, KeyEvent.VK_TAB, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\t", false, 0), new KeySymDescriptor("", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_Q, new KeyDescriptor(KeyEvent.VK_Q, KeyEvent.getExtendedKeyCodeForChar(1081), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0439", false, 0), new KeySymDescriptor("\u0419", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_W, new KeyDescriptor(KeyEvent.VK_W, KeyEvent.getExtendedKeyCodeForChar(1094), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0446", false, 0), new KeySymDescriptor("\u0426", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_E, new KeyDescriptor(KeyEvent.VK_E, KeyEvent.getExtendedKeyCodeForChar(1091), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0443", false, 0), new KeySymDescriptor("\u0423", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_R, new KeyDescriptor(KeyEvent.VK_R, KeyEvent.getExtendedKeyCodeForChar(1082), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u043a", false, 0), new KeySymDescriptor("\u041a", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_T, new KeyDescriptor(KeyEvent.VK_T, KeyEvent.getExtendedKeyCodeForChar(1077), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0435", false, 0), new KeySymDescriptor("\u0415", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_Y, new KeyDescriptor(KeyEvent.VK_Y, KeyEvent.getExtendedKeyCodeForChar(1085), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u043d", false, 0), new KeySymDescriptor("\u041d", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_U, new KeyDescriptor(KeyEvent.VK_U, KeyEvent.getExtendedKeyCodeForChar(1075), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0433", false, 0), new KeySymDescriptor("\u0413", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_I, new KeyDescriptor(KeyEvent.VK_I, KeyEvent.getExtendedKeyCodeForChar(1096), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0448", false, 0), new KeySymDescriptor("\u0428", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_O, new KeyDescriptor(KeyEvent.VK_O, KeyEvent.getExtendedKeyCodeForChar(1097), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0449", false, 0), new KeySymDescriptor("\u0429", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_P, new KeyDescriptor(KeyEvent.VK_P, KeyEvent.getExtendedKeyCodeForChar(1079), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0437", false, 0), new KeySymDescriptor("\u0417", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_OPEN_BRACKET, new KeyDescriptor(KeyEvent.VK_OPEN_BRACKET, KeyEvent.getExtendedKeyCodeForChar(1093), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0445", false, 0), new KeySymDescriptor("\u0425", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_CLOSE_BRACKET, new KeyDescriptor(KeyEvent.VK_CLOSE_BRACKET, KeyEvent.getExtendedKeyCodeForChar(1098), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u044a", false, 0), new KeySymDescriptor("\u042a", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_ENTER, new KeyDescriptor(KeyEvent.VK_ENTER, KeyEvent.VK_ENTER, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\r", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_CONTROL, new KeyDescriptor(KeyEvent.VK_CONTROL, KeyEvent.VK_CONTROL, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_A, new KeyDescriptor(KeyEvent.VK_A, KeyEvent.getExtendedKeyCodeForChar(1092), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0444", false, 0), new KeySymDescriptor("\u0424", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_S, new KeyDescriptor(KeyEvent.VK_S, KeyEvent.getExtendedKeyCodeForChar(1099), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u044b", false, 0), new KeySymDescriptor("\u042b", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_D, new KeyDescriptor(KeyEvent.VK_D, KeyEvent.getExtendedKeyCodeForChar(1074), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0432", false, 0), new KeySymDescriptor("\u0412", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_F, new KeyDescriptor(KeyEvent.VK_F, KeyEvent.getExtendedKeyCodeForChar(1072), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0430", false, 0), new KeySymDescriptor("\u0410", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_G, new KeyDescriptor(KeyEvent.VK_G, KeyEvent.getExtendedKeyCodeForChar(1087), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u043f", false, 0), new KeySymDescriptor("\u041f", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_H, new KeyDescriptor(KeyEvent.VK_H, KeyEvent.getExtendedKeyCodeForChar(1088), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0440", false, 0), new KeySymDescriptor("\u0420", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_J, new KeyDescriptor(KeyEvent.VK_J, KeyEvent.getExtendedKeyCodeForChar(1086), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u043e", false, 0), new KeySymDescriptor("\u041e", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_K, new KeyDescriptor(KeyEvent.VK_K, KeyEvent.getExtendedKeyCodeForChar(1083), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u043b", false, 0), new KeySymDescriptor("\u041b", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_L, new KeyDescriptor(KeyEvent.VK_L, KeyEvent.getExtendedKeyCodeForChar(1076), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0434", false, 0), new KeySymDescriptor("\u0414", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_SEMICOLON, new KeyDescriptor(KeyEvent.VK_SEMICOLON, KeyEvent.getExtendedKeyCodeForChar(1078), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0436", false, 0), new KeySymDescriptor("\u0416", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_QUOTE, new KeyDescriptor(KeyEvent.VK_QUOTE, KeyEvent.getExtendedKeyCodeForChar(1101), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u044d", false, 0), new KeySymDescriptor("\u042d", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_BACK_QUOTE, new KeyDescriptor(KeyEvent.VK_BACK_QUOTE, KeyEvent.getExtendedKeyCodeForChar(1105), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0451", false, 0), new KeySymDescriptor("\u0401", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_SHIFT, new KeyDescriptor(KeyEvent.VK_SHIFT, KeyEvent.VK_SHIFT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_BACK_SLASH, new KeyDescriptor(KeyEvent.VK_BACK_SLASH, KeyEvent.VK_BACK_SLASH, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\\", false, 0), new KeySymDescriptor("/", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_Z, new KeyDescriptor(KeyEvent.VK_Z, KeyEvent.getExtendedKeyCodeForChar(1103), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u044f", false, 0), new KeySymDescriptor("\u042f", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_X, new KeyDescriptor(KeyEvent.VK_X, KeyEvent.getExtendedKeyCodeForChar(1095), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0447", false, 0), new KeySymDescriptor("\u0427", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_C, new KeyDescriptor(KeyEvent.VK_C, KeyEvent.getExtendedKeyCodeForChar(1089), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0441", false, 0), new KeySymDescriptor("\u0421", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_V, new KeyDescriptor(KeyEvent.VK_V, KeyEvent.getExtendedKeyCodeForChar(1084), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u043c", false, 0), new KeySymDescriptor("\u041c", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_B, new KeyDescriptor(KeyEvent.VK_B, KeyEvent.getExtendedKeyCodeForChar(1080), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0438", false, 0), new KeySymDescriptor("\u0418", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_N, new KeyDescriptor(KeyEvent.VK_N, KeyEvent.getExtendedKeyCodeForChar(1090), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0442", false, 0), new KeySymDescriptor("\u0422", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_M, new KeyDescriptor(KeyEvent.VK_M, KeyEvent.getExtendedKeyCodeForChar(1100), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u044c", false, 0), new KeySymDescriptor("\u042c", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_COMMA, new KeyDescriptor(KeyEvent.VK_COMMA, KeyEvent.getExtendedKeyCodeForChar(1073), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0431", false, 0), new KeySymDescriptor("\u0411", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_PERIOD, new KeyDescriptor(KeyEvent.VK_PERIOD, KeyEvent.getExtendedKeyCodeForChar(1102), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u044e", false, 0), new KeySymDescriptor("\u042e", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_SLASH, new KeyDescriptor(KeyEvent.VK_SLASH, KeyEvent.VK_PERIOD, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor(".", false, 0), new KeySymDescriptor(",", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_MULTIPLY, new KeyDescriptor(KeyEvent.VK_MULTIPLY, KeyEvent.VK_MULTIPLY, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("*", false, 0), new KeySymDescriptor("*", false, 1), new KeySymDescriptor("*", false, 128), new KeySymDescriptor("*", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_ALT, new KeyDescriptor(KeyEvent.VK_ALT, KeyEvent.VK_ALT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_SPACE, new KeyDescriptor(KeyEvent.VK_SPACE, KeyEvent.VK_SPACE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor(" ", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_CAPS_LOCK, new KeyDescriptor(KeyEvent.VK_CAPS_LOCK, KeyEvent.VK_CAPS_LOCK, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F1, new KeyDescriptor(KeyEvent.VK_F1, KeyEvent.VK_F1, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F2, new KeyDescriptor(KeyEvent.VK_F2, KeyEvent.VK_F2, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F3, new KeyDescriptor(KeyEvent.VK_F3, KeyEvent.VK_F3, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F4, new KeyDescriptor(KeyEvent.VK_F4, KeyEvent.VK_F4, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F5, new KeyDescriptor(KeyEvent.VK_F5, KeyEvent.VK_F5, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F6, new KeyDescriptor(KeyEvent.VK_F6, KeyEvent.VK_F6, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F7, new KeyDescriptor(KeyEvent.VK_F7, KeyEvent.VK_F7, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F8, new KeyDescriptor(KeyEvent.VK_F8, KeyEvent.VK_F8, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F9, new KeyDescriptor(KeyEvent.VK_F9, KeyEvent.VK_F9, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F10, new KeyDescriptor(KeyEvent.VK_F10, KeyEvent.VK_F10, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_NUM_LOCK, new KeyDescriptor(KeyEvent.VK_NUM_LOCK, KeyEvent.VK_NUM_LOCK, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD7, new KeyDescriptor(KeyEvent.VK_NUMPAD7, KeyEvent.VK_HOME, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("7", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD8, new KeyDescriptor(KeyEvent.VK_NUMPAD8, KeyEvent.VK_KP_UP, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("8", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD9, new KeyDescriptor(KeyEvent.VK_NUMPAD9, KeyEvent.VK_PAGE_UP, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("9", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_SUBTRACT, new KeyDescriptor(KeyEvent.VK_SUBTRACT, KeyEvent.VK_SUBTRACT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("-", false, 0), new KeySymDescriptor("-", false, 1), new KeySymDescriptor("-", false, 128), new KeySymDescriptor("-", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD4, new KeyDescriptor(KeyEvent.VK_NUMPAD4, KeyEvent.VK_KP_LEFT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("4", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD5, new KeyDescriptor(KeyEvent.VK_NUMPAD5, KeyEvent.VK_BEGIN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("5", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD6, new KeyDescriptor(KeyEvent.VK_NUMPAD6, KeyEvent.VK_KP_RIGHT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("6", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_ADD, new KeyDescriptor(KeyEvent.VK_ADD, KeyEvent.VK_ADD, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("+", false, 0), new KeySymDescriptor("+", false, 1), new KeySymDescriptor("+", false, 128), new KeySymDescriptor("+", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD1, new KeyDescriptor(KeyEvent.VK_NUMPAD1, KeyEvent.VK_END, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("1", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD2, new KeyDescriptor(KeyEvent.VK_NUMPAD2, KeyEvent.VK_KP_DOWN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("2", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD3, new KeyDescriptor(KeyEvent.VK_NUMPAD3, KeyEvent.VK_PAGE_DOWN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("3", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD0, new KeyDescriptor(KeyEvent.VK_NUMPAD0, KeyEvent.VK_INSERT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("0", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_DECIMAL, new KeyDescriptor(KeyEvent.VK_DECIMAL, KeyEvent.VK_DELETE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor(",", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_LESS, new KeyDescriptor(KeyEvent.VK_LESS, KeyEvent.VK_SLASH, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("/", false, 0), new KeySymDescriptor("|", false, 1), new KeySymDescriptor("|", false, 128), new KeySymDescriptor("\u00a6", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_F11, new KeyDescriptor(KeyEvent.VK_F11, KeyEvent.VK_F11, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F12, new KeyDescriptor(KeyEvent.VK_F12, KeyEvent.VK_F12, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_DIVIDE, new KeyDescriptor(KeyEvent.VK_DIVIDE, KeyEvent.VK_DIVIDE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("/", false, 0), new KeySymDescriptor("/", false, 1), new KeySymDescriptor("/", false, 128), new KeySymDescriptor("/", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_PRINTSCREEN, new KeyDescriptor(KeyEvent.VK_PRINTSCREEN, KeyEvent.VK_PRINTSCREEN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 8))));
|
||||
layout.keys.put(KeyEvent.VK_ALT_GRAPH, new KeyDescriptor(KeyEvent.VK_ALT_GRAPH, KeyEvent.VK_ALT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_HOME, new KeyDescriptor(KeyEvent.VK_HOME, KeyEvent.VK_HOME, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_UP, new KeyDescriptor(KeyEvent.VK_UP, KeyEvent.VK_UP, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_PAGE_UP, new KeyDescriptor(KeyEvent.VK_PAGE_UP, KeyEvent.VK_PAGE_UP, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_LEFT, new KeyDescriptor(KeyEvent.VK_LEFT, KeyEvent.VK_LEFT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_RIGHT, new KeyDescriptor(KeyEvent.VK_RIGHT, KeyEvent.VK_RIGHT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_END, new KeyDescriptor(KeyEvent.VK_END, KeyEvent.VK_END, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_DOWN, new KeyDescriptor(KeyEvent.VK_DOWN, KeyEvent.VK_DOWN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_PAGE_DOWN, new KeyDescriptor(KeyEvent.VK_PAGE_DOWN, KeyEvent.VK_PAGE_DOWN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_INSERT, new KeyDescriptor(KeyEvent.VK_INSERT, KeyEvent.VK_INSERT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_DELETE, new KeyDescriptor(KeyEvent.VK_DELETE, KeyEvent.VK_DELETE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u007f", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_PAUSE, new KeyDescriptor(KeyEvent.VK_PAUSE, KeyEvent.VK_PAUSE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 4))));
|
||||
layout.keys.put(KeyEvent.VK_META, new KeyDescriptor(KeyEvent.VK_META, KeyEvent.VK_WINDOWS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_WINDOWS, new KeyDescriptor(KeyEvent.VK_WINDOWS, KeyEvent.VK_WINDOWS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F13, new KeyDescriptor(KeyEvent.VK_F13, KeyEvent.VK_F13, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F14, new KeyDescriptor(KeyEvent.VK_F14, KeyEvent.VK_F14, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F15, new KeyDescriptor(KeyEvent.VK_F15, KeyEvent.VK_F15, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F16, new KeyDescriptor(KeyEvent.VK_F16, KeyEvent.VK_F16, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F17, new KeyDescriptor(KeyEvent.VK_F17, KeyEvent.VK_F17, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F18, new KeyDescriptor(KeyEvent.VK_F18, KeyEvent.VK_F18, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F20, new KeyDescriptor(KeyEvent.VK_F20, KeyEvent.VK_F20, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F21, new KeyDescriptor(KeyEvent.VK_F21, KeyEvent.VK_F21, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F22, new KeyDescriptor(KeyEvent.VK_F22, KeyEvent.VK_F22, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F23, new KeyDescriptor(KeyEvent.VK_F23, KeyEvent.VK_F23, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layouts.add(layout);
|
||||
}
|
||||
|
||||
{
|
||||
var layout = new LayoutDescriptor("rs", "", "Serbian", false, new HashMap<>());
|
||||
layout.keys.put(KeyEvent.VK_ESCAPE, new KeyDescriptor(KeyEvent.VK_ESCAPE, KeyEvent.VK_ESCAPE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u001b", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_1, new KeyDescriptor(KeyEvent.VK_1, KeyEvent.VK_1, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("1", false, 0), new KeySymDescriptor("!", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_2, new KeyDescriptor(KeyEvent.VK_2, KeyEvent.VK_2, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("2", false, 0), new KeySymDescriptor("\"", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_3, new KeyDescriptor(KeyEvent.VK_3, KeyEvent.VK_3, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("3", false, 0), new KeySymDescriptor("#", false, 1), new KeySymDescriptor("^", true, 128))));
|
||||
layout.keys.put(KeyEvent.VK_4, new KeyDescriptor(KeyEvent.VK_4, KeyEvent.VK_4, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("4", false, 0), new KeySymDescriptor("$", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_5, new KeyDescriptor(KeyEvent.VK_5, KeyEvent.VK_5, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("5", false, 0), new KeySymDescriptor("%", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_6, new KeyDescriptor(KeyEvent.VK_6, KeyEvent.VK_6, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("6", false, 0), new KeySymDescriptor("&", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_7, new KeyDescriptor(KeyEvent.VK_7, KeyEvent.VK_7, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("7", false, 0), new KeySymDescriptor("/", false, 1), new KeySymDescriptor("`", true, 128))));
|
||||
layout.keys.put(KeyEvent.VK_8, new KeyDescriptor(KeyEvent.VK_8, KeyEvent.VK_8, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("8", false, 0), new KeySymDescriptor("(", false, 1), new KeySymDescriptor("\u030f", true, 128))));
|
||||
layout.keys.put(KeyEvent.VK_9, new KeyDescriptor(KeyEvent.VK_9, KeyEvent.VK_9, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("9", false, 0), new KeySymDescriptor(")", false, 1), new KeySymDescriptor("'", true, 128))));
|
||||
layout.keys.put(KeyEvent.VK_0, new KeyDescriptor(KeyEvent.VK_0, KeyEvent.VK_0, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("0", false, 0), new KeySymDescriptor("=", false, 1), new KeySymDescriptor("\u0311", true, 128))));
|
||||
layout.keys.put(KeyEvent.VK_MINUS, new KeyDescriptor(KeyEvent.VK_MINUS, KeyEvent.VK_QUOTE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("'", false, 0), new KeySymDescriptor("?", false, 1), new KeySymDescriptor("\u00af", true, 128))));
|
||||
layout.keys.put(KeyEvent.VK_EQUALS, new KeyDescriptor(KeyEvent.VK_EQUALS, KeyEvent.VK_PLUS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("+", false, 0), new KeySymDescriptor("*", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_BACK_SPACE, new KeyDescriptor(KeyEvent.VK_BACK_SPACE, KeyEvent.VK_BACK_SPACE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0008", false, 0), new KeySymDescriptor("\u0008", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_TAB, new KeyDescriptor(KeyEvent.VK_TAB, KeyEvent.VK_TAB, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\t", false, 0), new KeySymDescriptor("", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_Q, new KeyDescriptor(KeyEvent.VK_Q, KeyEvent.getExtendedKeyCodeForChar(1113), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0459", false, 0), new KeySymDescriptor("\u0409", false, 1), new KeySymDescriptor("\\", false, 128))));
|
||||
layout.keys.put(KeyEvent.VK_W, new KeyDescriptor(KeyEvent.VK_W, KeyEvent.getExtendedKeyCodeForChar(1114), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u045a", false, 0), new KeySymDescriptor("\u040a", false, 1), new KeySymDescriptor("|", false, 128))));
|
||||
layout.keys.put(KeyEvent.VK_E, new KeyDescriptor(KeyEvent.VK_E, KeyEvent.getExtendedKeyCodeForChar(1077), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0435", false, 0), new KeySymDescriptor("\u0415", false, 1), new KeySymDescriptor("\u20ac", false, 128), new KeySymDescriptor("\u00a3", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_R, new KeyDescriptor(KeyEvent.VK_R, KeyEvent.getExtendedKeyCodeForChar(1088), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0440", false, 0), new KeySymDescriptor("\u0420", false, 1), new KeySymDescriptor("\u00b6", false, 128), new KeySymDescriptor("\u00ae", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_T, new KeyDescriptor(KeyEvent.VK_T, KeyEvent.getExtendedKeyCodeForChar(1090), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0442", false, 0), new KeySymDescriptor("\u0422", false, 1), new KeySymDescriptor("\u2026", false, 128))));
|
||||
layout.keys.put(KeyEvent.VK_Y, new KeyDescriptor(KeyEvent.VK_Y, KeyEvent.getExtendedKeyCodeForChar(1079), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0437", false, 0), new KeySymDescriptor("\u0417", false, 1), new KeySymDescriptor("\u2190", false, 128), new KeySymDescriptor("\u00a5", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_U, new KeyDescriptor(KeyEvent.VK_U, KeyEvent.getExtendedKeyCodeForChar(1091), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0443", false, 0), new KeySymDescriptor("\u0423", false, 1), new KeySymDescriptor("\u2193", false, 128), new KeySymDescriptor("\u2191", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_I, new KeyDescriptor(KeyEvent.VK_I, KeyEvent.getExtendedKeyCodeForChar(1080), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0438", false, 0), new KeySymDescriptor("\u0418", false, 1), new KeySymDescriptor("\u2192", false, 128))));
|
||||
layout.keys.put(KeyEvent.VK_O, new KeyDescriptor(KeyEvent.VK_O, KeyEvent.getExtendedKeyCodeForChar(1086), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u043e", false, 0), new KeySymDescriptor("\u041e", false, 1), new KeySymDescriptor("\u00a7", false, 128))));
|
||||
layout.keys.put(KeyEvent.VK_P, new KeyDescriptor(KeyEvent.VK_P, KeyEvent.getExtendedKeyCodeForChar(1087), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u043f", false, 0), new KeySymDescriptor("\u041f", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_OPEN_BRACKET, new KeyDescriptor(KeyEvent.VK_OPEN_BRACKET, KeyEvent.getExtendedKeyCodeForChar(1096), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0448", false, 0), new KeySymDescriptor("\u0428", false, 1), new KeySymDescriptor("\u00f7", false, 128))));
|
||||
layout.keys.put(KeyEvent.VK_CLOSE_BRACKET, new KeyDescriptor(KeyEvent.VK_CLOSE_BRACKET, KeyEvent.getExtendedKeyCodeForChar(1106), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0452", false, 0), new KeySymDescriptor("\u0402", false, 1), new KeySymDescriptor("\u00d7", false, 128))));
|
||||
layout.keys.put(KeyEvent.VK_ENTER, new KeyDescriptor(KeyEvent.VK_ENTER, KeyEvent.VK_ENTER, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\r", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_CONTROL, new KeyDescriptor(KeyEvent.VK_CONTROL, KeyEvent.VK_CONTROL, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_A, new KeyDescriptor(KeyEvent.VK_A, KeyEvent.getExtendedKeyCodeForChar(1072), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0430", false, 0), new KeySymDescriptor("\u0410", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_S, new KeyDescriptor(KeyEvent.VK_S, KeyEvent.getExtendedKeyCodeForChar(1089), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0441", false, 0), new KeySymDescriptor("\u0421", false, 1), new KeySymDescriptor("\u201e", false, 128), new KeySymDescriptor("\u00bb", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_D, new KeyDescriptor(KeyEvent.VK_D, KeyEvent.getExtendedKeyCodeForChar(1076), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0434", false, 0), new KeySymDescriptor("\u0414", false, 1), new KeySymDescriptor("\u201c", false, 128), new KeySymDescriptor("\u00ab", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_F, new KeyDescriptor(KeyEvent.VK_F, KeyEvent.getExtendedKeyCodeForChar(1092), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0444", false, 0), new KeySymDescriptor("\u0424", false, 1), new KeySymDescriptor("[", false, 128))));
|
||||
layout.keys.put(KeyEvent.VK_G, new KeyDescriptor(KeyEvent.VK_G, KeyEvent.getExtendedKeyCodeForChar(1075), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0433", false, 0), new KeySymDescriptor("\u0413", false, 1), new KeySymDescriptor("]", false, 128))));
|
||||
layout.keys.put(KeyEvent.VK_H, new KeyDescriptor(KeyEvent.VK_H, KeyEvent.getExtendedKeyCodeForChar(1093), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0445", false, 0), new KeySymDescriptor("\u0425", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_J, new KeyDescriptor(KeyEvent.VK_J, KeyEvent.getExtendedKeyCodeForChar(1112), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0458", false, 0), new KeySymDescriptor("\u0408", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_K, new KeyDescriptor(KeyEvent.VK_K, KeyEvent.getExtendedKeyCodeForChar(1082), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u043a", false, 0), new KeySymDescriptor("\u041a", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_L, new KeyDescriptor(KeyEvent.VK_L, KeyEvent.getExtendedKeyCodeForChar(1083), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u043b", false, 0), new KeySymDescriptor("\u041b", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_SEMICOLON, new KeyDescriptor(KeyEvent.VK_SEMICOLON, KeyEvent.getExtendedKeyCodeForChar(1095), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0447", false, 0), new KeySymDescriptor("\u0427", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_QUOTE, new KeyDescriptor(KeyEvent.VK_QUOTE, KeyEvent.getExtendedKeyCodeForChar(1115), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u045b", false, 0), new KeySymDescriptor("\u040b", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_BACK_QUOTE, new KeyDescriptor(KeyEvent.VK_BACK_QUOTE, KeyEvent.VK_BACK_QUOTE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("`", false, 0), new KeySymDescriptor("~", false, 1), new KeySymDescriptor("\u00b0", false, 128), new KeySymDescriptor("\u00ac", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_SHIFT, new KeyDescriptor(KeyEvent.VK_SHIFT, KeyEvent.VK_SHIFT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_BACK_SLASH, new KeyDescriptor(KeyEvent.VK_BACK_SLASH, KeyEvent.getExtendedKeyCodeForChar(1078), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0436", false, 0), new KeySymDescriptor("\u0416", false, 1), new KeySymDescriptor("\u00a4", false, 128))));
|
||||
layout.keys.put(KeyEvent.VK_Z, new KeyDescriptor(KeyEvent.VK_Z, KeyEvent.getExtendedKeyCodeForChar(1078), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0436", false, 0), new KeySymDescriptor("\u0416", false, 1), new KeySymDescriptor("\u2018", false, 128))));
|
||||
layout.keys.put(KeyEvent.VK_X, new KeyDescriptor(KeyEvent.VK_X, KeyEvent.getExtendedKeyCodeForChar(1119), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u045f", false, 0), new KeySymDescriptor("\u040f", false, 1), new KeySymDescriptor("\u2019", false, 128))));
|
||||
layout.keys.put(KeyEvent.VK_C, new KeyDescriptor(KeyEvent.VK_C, KeyEvent.getExtendedKeyCodeForChar(1094), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0446", false, 0), new KeySymDescriptor("\u0426", false, 1), new KeySymDescriptor("\u00a2", false, 128), new KeySymDescriptor("\u00a9", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_V, new KeyDescriptor(KeyEvent.VK_V, KeyEvent.getExtendedKeyCodeForChar(1074), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0432", false, 0), new KeySymDescriptor("\u0412", false, 1), new KeySymDescriptor("@", false, 128))));
|
||||
layout.keys.put(KeyEvent.VK_B, new KeyDescriptor(KeyEvent.VK_B, KeyEvent.getExtendedKeyCodeForChar(1073), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u0431", false, 0), new KeySymDescriptor("\u0411", false, 1), new KeySymDescriptor("{", false, 128))));
|
||||
layout.keys.put(KeyEvent.VK_N, new KeyDescriptor(KeyEvent.VK_N, KeyEvent.getExtendedKeyCodeForChar(1085), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u043d", false, 0), new KeySymDescriptor("\u041d", false, 1), new KeySymDescriptor("}", false, 128))));
|
||||
layout.keys.put(KeyEvent.VK_M, new KeyDescriptor(KeyEvent.VK_M, KeyEvent.getExtendedKeyCodeForChar(1084), KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u043c", false, 0), new KeySymDescriptor("\u041c", false, 1), new KeySymDescriptor("^", false, 128))));
|
||||
layout.keys.put(KeyEvent.VK_COMMA, new KeyDescriptor(KeyEvent.VK_COMMA, KeyEvent.VK_COMMA, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor(",", false, 0), new KeySymDescriptor(";", false, 1), new KeySymDescriptor("<", false, 128))));
|
||||
layout.keys.put(KeyEvent.VK_PERIOD, new KeyDescriptor(KeyEvent.VK_PERIOD, KeyEvent.VK_PERIOD, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor(".", false, 0), new KeySymDescriptor(":", false, 1), new KeySymDescriptor(">", false, 128))));
|
||||
layout.keys.put(KeyEvent.VK_SLASH, new KeyDescriptor(KeyEvent.VK_SLASH, KeyEvent.VK_MINUS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("-", false, 0), new KeySymDescriptor("_", false, 1), new KeySymDescriptor("\u2014", false, 128), new KeySymDescriptor("\u2013", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_MULTIPLY, new KeyDescriptor(KeyEvent.VK_MULTIPLY, KeyEvent.VK_MULTIPLY, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("*", false, 0), new KeySymDescriptor("*", false, 1), new KeySymDescriptor("*", false, 128), new KeySymDescriptor("*", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_ALT, new KeyDescriptor(KeyEvent.VK_ALT, KeyEvent.VK_ALT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1))));
|
||||
layout.keys.put(KeyEvent.VK_SPACE, new KeyDescriptor(KeyEvent.VK_SPACE, KeyEvent.VK_SPACE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor(" ", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_CAPS_LOCK, new KeyDescriptor(KeyEvent.VK_CAPS_LOCK, KeyEvent.VK_CAPS_LOCK, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F1, new KeyDescriptor(KeyEvent.VK_F1, KeyEvent.VK_F1, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F2, new KeyDescriptor(KeyEvent.VK_F2, KeyEvent.VK_F2, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F3, new KeyDescriptor(KeyEvent.VK_F3, KeyEvent.VK_F3, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F4, new KeyDescriptor(KeyEvent.VK_F4, KeyEvent.VK_F4, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F5, new KeyDescriptor(KeyEvent.VK_F5, KeyEvent.VK_F5, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F6, new KeyDescriptor(KeyEvent.VK_F6, KeyEvent.VK_F6, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F7, new KeyDescriptor(KeyEvent.VK_F7, KeyEvent.VK_F7, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F8, new KeyDescriptor(KeyEvent.VK_F8, KeyEvent.VK_F8, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F9, new KeyDescriptor(KeyEvent.VK_F9, KeyEvent.VK_F9, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F10, new KeyDescriptor(KeyEvent.VK_F10, KeyEvent.VK_F10, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_NUM_LOCK, new KeyDescriptor(KeyEvent.VK_NUM_LOCK, KeyEvent.VK_NUM_LOCK, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD7, new KeyDescriptor(KeyEvent.VK_NUMPAD7, KeyEvent.VK_HOME, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("7", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD8, new KeyDescriptor(KeyEvent.VK_NUMPAD8, KeyEvent.VK_KP_UP, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("8", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD9, new KeyDescriptor(KeyEvent.VK_NUMPAD9, KeyEvent.VK_PAGE_UP, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("9", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_SUBTRACT, new KeyDescriptor(KeyEvent.VK_SUBTRACT, KeyEvent.VK_SUBTRACT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("-", false, 0), new KeySymDescriptor("-", false, 1), new KeySymDescriptor("-", false, 128), new KeySymDescriptor("-", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD4, new KeyDescriptor(KeyEvent.VK_NUMPAD4, KeyEvent.VK_KP_LEFT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("4", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD5, new KeyDescriptor(KeyEvent.VK_NUMPAD5, KeyEvent.VK_BEGIN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("5", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD6, new KeyDescriptor(KeyEvent.VK_NUMPAD6, KeyEvent.VK_KP_RIGHT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("6", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_ADD, new KeyDescriptor(KeyEvent.VK_ADD, KeyEvent.VK_ADD, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("+", false, 0), new KeySymDescriptor("+", false, 1), new KeySymDescriptor("+", false, 128), new KeySymDescriptor("+", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD1, new KeyDescriptor(KeyEvent.VK_NUMPAD1, KeyEvent.VK_END, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("1", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD2, new KeyDescriptor(KeyEvent.VK_NUMPAD2, KeyEvent.VK_KP_DOWN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("2", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD3, new KeyDescriptor(KeyEvent.VK_NUMPAD3, KeyEvent.VK_PAGE_DOWN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("3", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_NUMPAD0, new KeyDescriptor(KeyEvent.VK_NUMPAD0, KeyEvent.VK_INSERT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("0", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_DECIMAL, new KeyDescriptor(KeyEvent.VK_DECIMAL, KeyEvent.VK_DELETE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor(",", false, 16))));
|
||||
layout.keys.put(KeyEvent.VK_LESS, new KeyDescriptor(KeyEvent.VK_LESS, KeyEvent.VK_LESS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("<", false, 0), new KeySymDescriptor(">", false, 1), new KeySymDescriptor("|", false, 128), new KeySymDescriptor("\u00a6", false, 129))));
|
||||
layout.keys.put(KeyEvent.VK_F11, new KeyDescriptor(KeyEvent.VK_F11, KeyEvent.VK_F11, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_F12, new KeyDescriptor(KeyEvent.VK_F12, KeyEvent.VK_F12, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 1), new KeySymDescriptor("", false, 128), new KeySymDescriptor("", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_DIVIDE, new KeyDescriptor(KeyEvent.VK_DIVIDE, KeyEvent.VK_DIVIDE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("/", false, 0), new KeySymDescriptor("/", false, 1), new KeySymDescriptor("/", false, 128), new KeySymDescriptor("/", false, 129), new KeySymDescriptor("", false, 12))));
|
||||
layout.keys.put(KeyEvent.VK_PRINTSCREEN, new KeyDescriptor(KeyEvent.VK_PRINTSCREEN, KeyEvent.VK_PRINTSCREEN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 8))));
|
||||
layout.keys.put(KeyEvent.VK_ALT_GRAPH, new KeyDescriptor(KeyEvent.VK_ALT_GRAPH, KeyEvent.VK_ALT_GRAPH, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_HOME, new KeyDescriptor(KeyEvent.VK_HOME, KeyEvent.VK_HOME, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_UP, new KeyDescriptor(KeyEvent.VK_UP, KeyEvent.VK_UP, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_PAGE_UP, new KeyDescriptor(KeyEvent.VK_PAGE_UP, KeyEvent.VK_PAGE_UP, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_LEFT, new KeyDescriptor(KeyEvent.VK_LEFT, KeyEvent.VK_LEFT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_RIGHT, new KeyDescriptor(KeyEvent.VK_RIGHT, KeyEvent.VK_RIGHT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_END, new KeyDescriptor(KeyEvent.VK_END, KeyEvent.VK_END, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_DOWN, new KeyDescriptor(KeyEvent.VK_DOWN, KeyEvent.VK_DOWN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_PAGE_DOWN, new KeyDescriptor(KeyEvent.VK_PAGE_DOWN, KeyEvent.VK_PAGE_DOWN, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_INSERT, new KeyDescriptor(KeyEvent.VK_INSERT, KeyEvent.VK_INSERT, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_DELETE, new KeyDescriptor(KeyEvent.VK_DELETE, KeyEvent.VK_DELETE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("\u007f", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_PAUSE, new KeyDescriptor(KeyEvent.VK_PAUSE, KeyEvent.VK_PAUSE, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0), new KeySymDescriptor("", false, 4))));
|
||||
layout.keys.put(KeyEvent.VK_META, new KeyDescriptor(KeyEvent.VK_META, KeyEvent.VK_WINDOWS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_WINDOWS, new KeyDescriptor(KeyEvent.VK_WINDOWS, KeyEvent.VK_WINDOWS, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F13, new KeyDescriptor(KeyEvent.VK_F13, KeyEvent.VK_F13, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F14, new KeyDescriptor(KeyEvent.VK_F14, KeyEvent.VK_F14, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F15, new KeyDescriptor(KeyEvent.VK_F15, KeyEvent.VK_F15, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F16, new KeyDescriptor(KeyEvent.VK_F16, KeyEvent.VK_F16, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F17, new KeyDescriptor(KeyEvent.VK_F17, KeyEvent.VK_F17, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F18, new KeyDescriptor(KeyEvent.VK_F18, KeyEvent.VK_F18, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F20, new KeyDescriptor(KeyEvent.VK_F20, KeyEvent.VK_F20, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F21, new KeyDescriptor(KeyEvent.VK_F21, KeyEvent.VK_F21, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F22, new KeyDescriptor(KeyEvent.VK_F22, KeyEvent.VK_F22, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layout.keys.put(KeyEvent.VK_F23, new KeyDescriptor(KeyEvent.VK_F23, KeyEvent.VK_F23, KeyEvent.VK_UNDEFINED, List.of(new KeySymDescriptor("", false, 0))));
|
||||
layouts.add(layout);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -66,7 +66,6 @@ public class bug5047379 {
|
||||
testRobot.delay(1000);
|
||||
testRobot.waitForIdle();
|
||||
Point movePoint = getButtonPoint(b);
|
||||
System.out.println("==> move to (" + movePoint.x + ", " + movePoint.y + ")");
|
||||
testRobot.mouseMove(movePoint.x, movePoint.y);
|
||||
testRobot.delay(2000);
|
||||
testRobot.waitForIdle();
|
||||
|
||||
31
test/jdk/jb/build/jsa6246.sh
Normal file
31
test/jdk/jb/build/jsa6246.sh
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# @test
|
||||
# @summary jsa6246.sh checks jsa files exist in jbrsdk distributions, jbr distributions are skipped
|
||||
# @run shell jsa6246.sh
|
||||
|
||||
if [ -z "${TESTJAVA}" ]; then
|
||||
echo "TESTJAVA undefined: testing cancelled"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
source ${TESTJAVA}/release
|
||||
echo "Checking $IMPLEMENTOR_VERSION"
|
||||
if [[ "$IMPLEMENTOR_VERSION" != *"JBRSDK"* ]]; then
|
||||
echo "Test executed for JBRSDK only"
|
||||
echo "skipping the test"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
FIND="/usr/bin/find"
|
||||
files=$(${FIND} ${TESTJAVA} -name "*.jsa")
|
||||
ls -l $files
|
||||
if [ $? != 0 ]; then
|
||||
echo "Command failed."
|
||||
exit 1
|
||||
elif [ -z "$files" ]; then
|
||||
echo "*** FAILED *** jsa-files not found"
|
||||
echo "\n*** FAILED *** Test failed"
|
||||
exit 1
|
||||
fi
|
||||
echo "\nTest passed"
|
||||
@@ -1,159 +0,0 @@
|
||||
/*
|
||||
* Copyright 2023 JetBrains s.r.o.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/* @test
|
||||
* @summary Verifies transitions between extended frame states
|
||||
* @requires os.family == "linux"
|
||||
* @run main ExtendedFrameState
|
||||
*/
|
||||
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.WindowConstants;
|
||||
import java.awt.Frame;
|
||||
import java.awt.Robot;
|
||||
import java.awt.Toolkit;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
public class ExtendedFrameState {
|
||||
static final int DELAY_MS = 1000;
|
||||
JFrame frame;
|
||||
Robot robot = new Robot();
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
var toolkit = Toolkit.getDefaultToolkit();
|
||||
if (toolkit.isFrameStateSupported(Frame.MAXIMIZED_HORIZ)
|
||||
&& toolkit.isFrameStateSupported(Frame.MAXIMIZED_VERT)
|
||||
&& toolkit.isFrameStateSupported(Frame.MAXIMIZED_BOTH)) {
|
||||
var test = new ExtendedFrameState();
|
||||
|
||||
try {
|
||||
test.prepare();
|
||||
test.execute();
|
||||
} finally {
|
||||
test.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ExtendedFrameState() throws Exception {
|
||||
}
|
||||
|
||||
void prepare() {
|
||||
runSwing(() -> {
|
||||
frame = new JFrame("ExtendedFrameState");
|
||||
frame.setUndecorated(true);
|
||||
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
|
||||
JPanel panel = new JPanel();
|
||||
panel.add(new JLabel("label text"));
|
||||
frame.setContentPane(panel);
|
||||
frame.pack();
|
||||
frame.setVisible(true);
|
||||
});
|
||||
}
|
||||
|
||||
void execute() {
|
||||
setState(Frame.NORMAL);
|
||||
assertStateIs(Frame.NORMAL);
|
||||
|
||||
// NORMAL -> MAXIMIZED_VERT
|
||||
setState(Frame.MAXIMIZED_VERT);
|
||||
assertStateIs(Frame.MAXIMIZED_VERT);
|
||||
|
||||
// MAXIMIZED_VERT -> NORMAL
|
||||
setState(Frame.NORMAL);
|
||||
assertStateIs(Frame.NORMAL);
|
||||
|
||||
// NORMAL -> MAXIMIZED_HORIZ
|
||||
setState(Frame.MAXIMIZED_HORIZ);
|
||||
assertStateIs(Frame.MAXIMIZED_HORIZ);
|
||||
|
||||
// MAXIMIZED_HORIZ -> MAXIMIZED_VERT
|
||||
// This transition is not supported by the WM for some obscure reason
|
||||
//setState(Frame.MAXIMIZED_VERT);
|
||||
//assertStateIs(Frame.MAXIMIZED_VERT);
|
||||
|
||||
// MAXIMIZED_VERT -> MAXIMIZED_HORIZ
|
||||
setState(Frame.MAXIMIZED_HORIZ);
|
||||
assertStateIs(Frame.MAXIMIZED_HORIZ);
|
||||
|
||||
// MAXIMIZED_HORIZ -> NORMAL
|
||||
setState(Frame.NORMAL);
|
||||
assertStateIs(Frame.NORMAL);
|
||||
|
||||
// NORMAL -> MAXIMIZED_BOTH
|
||||
setState(Frame.MAXIMIZED_BOTH);
|
||||
assertStateIs(Frame.MAXIMIZED_BOTH);
|
||||
|
||||
// MAXIMIZED_BOTH -> MAXIMIZED_HORIZ
|
||||
setState(Frame.MAXIMIZED_HORIZ);
|
||||
assertStateIs(Frame.MAXIMIZED_HORIZ);
|
||||
|
||||
// MAXIMIZED_HORIZ -> MAXIMIZED_BOTH
|
||||
setState(Frame.MAXIMIZED_BOTH);
|
||||
assertStateIs(Frame.MAXIMIZED_BOTH);
|
||||
|
||||
// MAXIMIZED_BOTH -> MAXIMIZED_VERT
|
||||
setState(Frame.MAXIMIZED_VERT);
|
||||
assertStateIs(Frame.MAXIMIZED_VERT);
|
||||
|
||||
// MAXIMIZED_VERT -> NORMAL
|
||||
setState(Frame.NORMAL);
|
||||
assertStateIs(Frame.NORMAL);
|
||||
}
|
||||
|
||||
void setState(int state) {
|
||||
runSwing(() -> {
|
||||
frame.setExtendedState(state);
|
||||
});
|
||||
robot.waitForIdle();
|
||||
robot.delay(DELAY_MS);
|
||||
}
|
||||
|
||||
void assertStateIs(int idealState) {
|
||||
runSwing(() -> {
|
||||
int realState = frame.getExtendedState();
|
||||
if (idealState != realState) {
|
||||
throw new RuntimeException(
|
||||
String.format("Expected frame state %d, got %d", idealState, realState));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void dispose() {
|
||||
runSwing(() -> {
|
||||
frame.dispose();
|
||||
});
|
||||
}
|
||||
|
||||
private static void runSwing(Runnable r) {
|
||||
try {
|
||||
SwingUtilities.invokeAndWait(r);
|
||||
} catch (InterruptedException e) {
|
||||
} catch (InvocationTargetException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,156 +0,0 @@
|
||||
/*
|
||||
* Copyright 2023 JetBrains s.r.o.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/* @test
|
||||
* @summary Verifies transitions between extended frame states
|
||||
* @requires os.family == "linux"
|
||||
* @run main ResizeUndecorated
|
||||
*/
|
||||
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.WindowConstants;
|
||||
import java.awt.Frame;
|
||||
import java.awt.Robot;
|
||||
import java.awt.Toolkit;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
public class ResizeUndecorated {
|
||||
static final int DELAY_MS = 1000;
|
||||
JFrame frame;
|
||||
Robot robot = new Robot();
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
var toolkit = Toolkit.getDefaultToolkit();
|
||||
if (toolkit.isFrameStateSupported(Frame.MAXIMIZED_HORIZ)
|
||||
&& toolkit.isFrameStateSupported(Frame.MAXIMIZED_VERT)
|
||||
&& toolkit.isFrameStateSupported(Frame.MAXIMIZED_BOTH)) {
|
||||
var test = new ResizeUndecorated();
|
||||
|
||||
try {
|
||||
test.prepare();
|
||||
test.execute();
|
||||
} finally {
|
||||
test.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ResizeUndecorated() throws Exception {
|
||||
}
|
||||
|
||||
void prepare() {
|
||||
runSwing(() -> {
|
||||
frame = new JFrame("Resize Undecorated Test");
|
||||
frame.setUndecorated(true);
|
||||
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
|
||||
JPanel panel = new JPanel();
|
||||
panel.add(new JLabel("label text"));
|
||||
frame.setContentPane(panel);
|
||||
frame.pack();
|
||||
frame.setVisible(true);
|
||||
});
|
||||
}
|
||||
|
||||
void execute() {
|
||||
setState(Frame.NORMAL);
|
||||
assertStateIs(Frame.NORMAL);
|
||||
|
||||
setState(Frame.MAXIMIZED_VERT);
|
||||
assertStateIs(Frame.MAXIMIZED_VERT);
|
||||
resizeFrame(10, 0);
|
||||
|
||||
setState(Frame.NORMAL);
|
||||
assertStateIs(Frame.NORMAL);
|
||||
runSwing(() -> {
|
||||
frame.setBounds(100, 100, 200, 300);
|
||||
});
|
||||
|
||||
robot.waitForIdle();
|
||||
robot.delay(DELAY_MS);
|
||||
|
||||
setState(Frame.MAXIMIZED_HORIZ);
|
||||
assertStateIs(Frame.MAXIMIZED_HORIZ);
|
||||
resizeFrame(0, 20);
|
||||
}
|
||||
|
||||
void resizeFrame(int dx, int dy) {
|
||||
var bounds = frame.getBounds();
|
||||
runSwing(() -> {
|
||||
frame.setBounds(bounds.x, bounds.y, bounds.width + dx, bounds.height + dy);
|
||||
});
|
||||
robot.waitForIdle();
|
||||
robot.delay(DELAY_MS);
|
||||
runSwing(() -> {
|
||||
var newBounds = frame.getBounds();
|
||||
if (bounds.width + dx != newBounds.width) {
|
||||
throw new RuntimeException(
|
||||
String.format("Frame width after resize is %d, should be %d",
|
||||
newBounds.width,
|
||||
bounds.width + dx));
|
||||
}
|
||||
|
||||
if (bounds.height + dy != newBounds.height) {
|
||||
throw new RuntimeException(
|
||||
String.format("Frame height after resize is %d, should be %d",
|
||||
newBounds.height,
|
||||
bounds.height + dy));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void setState(int state) {
|
||||
runSwing(() -> {
|
||||
frame.setExtendedState(state);
|
||||
});
|
||||
robot.waitForIdle();
|
||||
robot.delay(DELAY_MS);
|
||||
}
|
||||
|
||||
void assertStateIs(int idealState) {
|
||||
runSwing(() -> {
|
||||
int realState = frame.getExtendedState();
|
||||
if (idealState != realState) {
|
||||
throw new RuntimeException(
|
||||
String.format("Expected frame state %d, got %d", idealState, realState));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void dispose() {
|
||||
runSwing(() -> {
|
||||
frame.dispose();
|
||||
});
|
||||
}
|
||||
|
||||
private static void runSwing(Runnable r) {
|
||||
try {
|
||||
SwingUtilities.invokeAndWait(r);
|
||||
} catch (InterruptedException e) {
|
||||
} catch (InvocationTargetException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -185,7 +185,7 @@ public class InputMethodTest {
|
||||
|
||||
public static void layout(String name) {
|
||||
List<String> layouts = new ArrayList<>();
|
||||
if (name.matches("com\\.apple\\.inputmethod\\.(SCIM|TCIM|TYIM|Korean|VietnameseIM|Kotoeri\\.\\w+)\\.\\w+")) {
|
||||
if (name.matches("com\\.apple\\.inputmethod\\.(SCIM|TCIM|TYIM|Kotoeri\\.\\w+)\\.\\w+")) {
|
||||
layouts.add(name.replaceFirst("\\.\\w+$", ""));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,124 +0,0 @@
|
||||
###########################################################################
|
||||
#
|
||||
# Copyright (c) 2023, JetBrains s.r.o.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
###########################################################################
|
||||
#
|
||||
# List of tests that should not be run by test/Makefile, for various reasons:
|
||||
# 1. Does not run with jtreg -samevm mode
|
||||
# 2. Causes problems in jtreg -samevm mode for jtreg or tests that follow it
|
||||
# 3. The test is too slow or consumes too many system resources
|
||||
# 4. The test fails when run on any official build systems
|
||||
#
|
||||
# It is possible that a test being on this list is a mistake, and that some
|
||||
# other test in samevm mode caused tests to fail, mistakes happen.
|
||||
#
|
||||
# Tests marked @ignore are not run by test/Makefile, but harmless to be listed.
|
||||
#
|
||||
# Tests that explicitly state "@run main/othervm ...", and are not listed here,
|
||||
# will be run in the same batch as the samevm tests.
|
||||
#
|
||||
# Shell tests are othervm by default.
|
||||
#
|
||||
# List items are testnames followed by labels, all MUST BE commented
|
||||
# as to why they are here and use a label:
|
||||
# generic-all Problems on all platforms
|
||||
# generic-ARCH Where ARCH is one of: x64, i586, ppc64, ppc64le, s390x, aarch64 etc.
|
||||
# OSNAME-all Where OSNAME is one of: linux, windows, macosx, aix
|
||||
# OSNAME-ARCH Specific on to one OSNAME and ARCH, e.g. macosx-x64
|
||||
# OSNAME-REV Specific on to one OSNAME and REV, e.g. macosx-10.7.4
|
||||
#
|
||||
# More than one label is allowed but must be on the same line comma seperated,
|
||||
# without spaces.
|
||||
# If there are several lines mentioning the same test, the last one is used.
|
||||
#
|
||||
#############################################################################
|
||||
#
|
||||
# Running the tests:
|
||||
# cd test && make JT_HOME=jtreg_home PRODUCT_HOME=jdk_home jdk_all
|
||||
# Or instead of jdk_all, use any of the jdk_* targets.
|
||||
#
|
||||
# Samevm Notes:
|
||||
# * Although some tests may have only been seen to fail on some platforms,
|
||||
# they might be flagged as 'generic-all' because the problem they have
|
||||
# could cause hidden slowdowns on other platforms.
|
||||
# Most samevm problems will be generic-all, but windows usually dislikes
|
||||
# them the most.
|
||||
# Address already in use or connection errors indicate a generic port issue.
|
||||
# (this is not necessarily a samevm issue, but an issue for running the tests
|
||||
# on shared machines, two people or two test runs will collide).
|
||||
# * Samevm problem (windows in particular) is not closing all input/output
|
||||
# * Samevm problem when a test calls setSecurityManager()
|
||||
# * Samevm problem with setHttps*() is used? (not exactly sure here)
|
||||
# * Samevm problem when stuffing system properties with non Strings or anything
|
||||
# * Samevm problem when changing vm settings, or registering any vm actions
|
||||
# * Samevm problems with deleteOnExit(), if it must happen at end of test
|
||||
# * Samevm problems with URLClassLoader? (no details here)
|
||||
# * Samevm problems with dependence on predictable GC or finalizations
|
||||
#
|
||||
# Any of the above problems may mean the test needs to be flagged as "othervm".
|
||||
#
|
||||
#############################################################################
|
||||
#
|
||||
# Fixing the tests:
|
||||
#
|
||||
# Some tests just may need to be run with "othervm", and that can easily be
|
||||
# done by adding a @run line (or modifying any existing @run):
|
||||
# @run main/othervm NameOfMainClass
|
||||
# Make sure this @run follows any use of @library.
|
||||
# Otherwise, if the test is a samevm possibility, make sure the test is
|
||||
# cleaning up after itself, closing all streams, deleting temp files, etc.
|
||||
#
|
||||
# Keep in mind that the bug could be in many places, and even different per
|
||||
# platform, it could be a bug in any one of:
|
||||
# - the testcase
|
||||
# - the jdk (jdk classes, native code, or hotspot)
|
||||
# - the native compiler
|
||||
# - the javac compiler
|
||||
# - the OS (depends on what the testcase does)
|
||||
#
|
||||
# If you managed to really fix one of these tests, here is how you can
|
||||
# remove tests from this list:
|
||||
# 1. Make sure test passes on all platforms with samevm, or mark it othervm
|
||||
# 2. Make sure test passes on all platforms when run with it's entire group
|
||||
# 3. Make sure both VMs are tested, -server and -client, if possible
|
||||
# 4. Use your favorite build and test system to verify these results
|
||||
# 5. Delete lines in this file, include the changes with your test changes
|
||||
#
|
||||
# You may need to repeat your testing 2 or even 3 times to verify good
|
||||
# results, some of these samevm failures are not very predictable.
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
############################################################################
|
||||
|
||||
java/awt/event/MouseEvent/AcceptExtraButton/AcceptExtraButton.java JBR-6353 linux-x64,windows-aarch64,macosx-all
|
||||
java/awt/FlowLayout/PreferredLayoutSize.java JBR-6349 linux-all
|
||||
java/awt/Frame/GetGraphicsStressTest/GetGraphicsStressTest.java NOBUG windows-all timeout
|
||||
java/awt/MenuItem/EnableTest.java NOBUG windows-all timeout
|
||||
java/awt/Robot/NonEmptyErrorStream.java JBR-6275 macosx-all
|
||||
|
||||
javax/swing/JWindow/ShapedAndTranslucentWindows/ShapedPerPixelTranslucentGradient.java 8233582,JBR-6360 linux-all,windows-all
|
||||
javax/swing/plaf/synth/SynthButtonUI/6276188/bug6276188.java NOBUG macosx-all Synth ButtonUI does not handle PRESSED & MOUSE_OVER state
|
||||
javax/swing/UI/UnninstallUIMemoryLeaks/UnninstallUIMemoryLeaks.java JBR-5952,JBR-6274 windows-x64,macosx-all
|
||||
|
||||
jb/java/awt/Focus/PopupIncomingFocusTest.java JBR-2651 generic-all
|
||||
@@ -1,13 +1,10 @@
|
||||
java/awt/Choice/ChoicePopupLocation/ChoicePopupLocation.java 8202931,JBR-5398 macosx-all,linux-all,windows-all
|
||||
java/awt/Debug/X11Trace.java JBR-5442 linux-all
|
||||
java/awt/Dialog/NestedDialogs/Modal/NestedModalDialogTest.java JBR-6294 linux-all
|
||||
java/awt/Multiscreen/MultiScreenLocationTest/MultiScreenLocationTest.java JBR-6058 windows-all
|
||||
java/awt/FullScreen/CurrentDisplayModeTest/CurrentDisplayModeTest.java JBR-5059 linux-all
|
||||
java/awt/FullScreen/MultimonFullscreenTest/MultimonDeadlockTest.java JBR-4379 windows-all
|
||||
java/awt/Frame/FramesGC/FramesGC.java 8079069,JBR-6057 macosx-all,windows-all
|
||||
java/awt/GraphicsDevice/DisplayModes/CompareToXrandrTest.java JBR-5062 linux-all
|
||||
java/awt/GraphicsDevice/DisplayModes/UnknownRefrshRateTest.java JBR-6336 macosx-aarch64
|
||||
java/awt/GraphicsDevice/IncorrectDisplayModeExitFullscreen.java JBR-6336 macosx-aarch64
|
||||
java/awt/datatransfer/Clipboard/GetContentsInterruptedTest.java JBR-5086 linux-5.15.0-46-generic Ubuntu 20.04
|
||||
java/awt/dnd/MissedDragEnterTest.java JBR-6091 windows-all
|
||||
java/awt/Frame/GetGraphicsStressTest/GetGraphicsStressTest.java JBR-5117 linux-all
|
||||
@@ -25,7 +22,6 @@ java/awt/Robot/HiDPIScreenCapture/ScreenCaptureTest.java 8253184,JBR-5442 window
|
||||
java/awt/Robot/MouseLocationOnScreen/MouseLocationOnScreen.java JBR-5390 macosx-all,linux-all
|
||||
java/awt/Robot/NonEmptyErrorStream.java JBR-5442 linux-all
|
||||
java/awt/Robot/RobotMoveMultiscreen.java JBR-5442 linux-all
|
||||
java/awt/TextArea/TextAreaEditing/TextAreaEditing.java JBR-6282 linux-all
|
||||
java/awt/Toolkit/AWTEventListenerProxyTest/AWTEventListenerProxyTest.java JBR-6065 windows-all
|
||||
java/awt/Window/SlowMotion/SlowMotion.java JBR-5442 linux-all
|
||||
java/awt/Window/WindowSizeDifferentScreens/WindowSizeDifferentScreens.java JBR-5442 linux-all
|
||||
@@ -40,7 +36,6 @@ javax/swing/JMenu/4692443/bug4692443.java JBR-6065 windows-all
|
||||
javax/swing/JMenuBar/4750590/bug4750590.java JBR-6065 windows-all
|
||||
javax/swing/JMenuItem/4171437/bug4171437.java JBR-6065 windows-all
|
||||
javax/swing/JTable/7124218/SelectEditTableCell.java JBR-5442 linux-all
|
||||
javax/swing/JTextArea/8149849/DNDTextToScaledArea.java JBR-6296 linux-all
|
||||
javax/swing/JTextField/8036819/bug8036819.java JBR-6065 windows-all
|
||||
javax/swing/JTree/4927934/bug4927934.java JBR-6065 windows-all
|
||||
javax/swing/plaf/basic/BasicGraphicsUtils/8132119/bug8132119.java JBR-5442 linux-all
|
||||
@@ -48,103 +43,3 @@ javax/swing/plaf/metal/MetalGradient/8163193/ButtonGradientTest.java 8253184,JBR
|
||||
javax/swing/SwingWorker/TestDoneBeforeDoInBackground.java JBR-5442 linux-all
|
||||
javax/swing/text/html/StyleSheet/bug4936917.java JBR-899,JBR-5510,JBR-5442 windows-all,linux-all
|
||||
javax/swing/UI/UnninstallUIMemoryLeaks/UnninstallUIMemoryLeaks.java JBR-5952,JBR-5442 windows-x64,linux-all
|
||||
|
||||
java/awt/event/MouseEvent/AcceptExtraButton/AcceptExtraButton.java JBR-6353 linux-x64,windows-aarch64,macosx-all
|
||||
java/awt/Choice/ChoiceGeneratesItemEvents.java JBR-551 linux-all
|
||||
java/awt/Choice/ChoiceStaysOpenedOnTAB.java JBR-5510 linux-all
|
||||
java/awt/Choice/PopdownGeneratesMouseEvents/PopdownGeneratesMouseEvents.java JBR-5510 linux-all
|
||||
java/awt/ColorClass/AlphaColorTest.java JBR-5359,JBR-5510 windows-aarch64,linux-all
|
||||
java/awt/Component/RepaintTest.java JBR-5359,JBR-5510 windows-aarch64,linux-all
|
||||
java/awt/Dialog/DialogAboveFrame/DialogAboveFrameTest.java JBR-5210,JBR-5510 windows-all,linux-all
|
||||
java/awt/dnd/DnDTestWithHIDPI/DragTestWithHIDPI.java NOBUG linux-all
|
||||
java/awt/FlowLayout/PreferredLayoutSize.java JBR-6349 linux-all
|
||||
java/awt/Frame/InvisibleOwner/InvisibleOwner.java JBR-5359,JBR-5510 windows-aarch64,linux-all
|
||||
java/awt/Frame/ShapeNotSetSometimes/ShapeNotSetSometimes.java JBR-5210 windows-all,linux-all
|
||||
java/awt/Graphics/XORPaint.java#id2 NOBUG linux-all
|
||||
java/awt/Graphics2D/CopyAreaOOB.java JBR-5354 macosx-all,windows-all,linux-all
|
||||
java/awt/image/multiresolution/MenuMultiresolutionIconTest.java JBR-4880,8253184,JBR-5510 windows-all,linux-all
|
||||
java/awt/image/multiresolution/MultiResolutionJOptionPaneIconTest.java 8253184,JBR-5510 windows-all,linux-all
|
||||
java/awt/Menu/OpensWithNoGrab/OpensWithNoGrab.java JBR-5510 linux-all
|
||||
java/awt/Mixing/AWT_Mixing/JButtonInGlassPaneOverlapping.java 8158801,JBR-5510 windows-all,linux-all
|
||||
java/awt/Mixing/AWT_Mixing/JButtonOverlapping.java 8158801,JBR-5510 windows-all,linux-all
|
||||
java/awt/Mixing/AWT_Mixing/JColorChooserOverlapping.java 8158801,JBR-5510 windows-all,linux-all
|
||||
java/awt/Mixing/AWT_Mixing/JComboBoxOverlapping.java 8049405,JBR-5359,JBR-5510 macosx-all,windows-aarch64,linux-all
|
||||
java/awt/Mixing/AWT_Mixing/JEditorPaneInGlassPaneOverlapping.java 8158801,JBR-5510 windows-all,linux-all
|
||||
java/awt/Mixing/AWT_Mixing/JEditorPaneOverlapping.java 8158801,JBR-5510 windows-all,linux-all
|
||||
java/awt/Mixing/AWT_Mixing/JGlassPaneInternalFrameOverlapping.java JBR-5359,JBR-5510 windows-aarch64,linux-all
|
||||
java/awt/Mixing/AWT_Mixing/JGlassPaneMoveOverlapping.java JBR-5359,JBR-5510 windows-aarch64,linux-all
|
||||
java/awt/Mixing/AWT_Mixing/JInternalFrameMoveOverlapping.java 6986109,JBR-5510 windows-all,linux-all
|
||||
java/awt/Mixing/AWT_Mixing/JInternalFrameOverlapping.java JBR-5359,JBR-5510 windows-aarch64,linux-all
|
||||
java/awt/Mixing/AWT_Mixing/JLabelInGlassPaneOverlapping.java 8158801,JBR-5510 windows-all,linux-all
|
||||
java/awt/Mixing/AWT_Mixing/JLabelOverlapping.java 8158801,JBR-5510 windows-all,linux-all
|
||||
java/awt/Mixing/AWT_Mixing/JListInGlassPaneOverlapping.java 8158801,JBR-5510 windows-all,linux-all
|
||||
java/awt/Mixing/AWT_Mixing/JListOverlapping.java 8158801,JBR-5510 windows-all,linux-all
|
||||
java/awt/Mixing/AWT_Mixing/JPanelInGlassPaneOverlapping.java 8158801,JBR-5510 windows-all,linux-all
|
||||
java/awt/Mixing/AWT_Mixing/JPanelOverlapping.java 8158801,JBR-5510 windows-all,linux-all
|
||||
java/awt/Mixing/AWT_Mixing/JPopupMenuOverlapping.java JBR-5210,8049405,JBR-5510 windows-all,macosx-all,linux-all
|
||||
java/awt/Mixing/AWT_Mixing/JProgressBarInGlassPaneOverlapping.java 8158801,JBR-5510 windows-all,linux-all
|
||||
java/awt/Mixing/AWT_Mixing/JProgressBarOverlapping.java 8158801,JBR-5510 windows-all,linux-all
|
||||
java/awt/Mixing/AWT_Mixing/JScrollBarInGlassPaneOverlapping.java 8158801,JBR-5510 windows-all,linux-all
|
||||
java/awt/Mixing/AWT_Mixing/JScrollBarOverlapping.java 8158801,JBR-5510 windows-all,linux-all
|
||||
java/awt/Mixing/AWT_Mixing/JScrollPaneOverlapping.java 8158801,JBR-5510 windows-all,linux-all
|
||||
java/awt/Mixing/AWT_Mixing/JSliderInGlassPaneOverlapping.java 8158801,JBR-5510 windows-all,linux-all
|
||||
java/awt/Mixing/AWT_Mixing/JSliderOverlapping.java 8158801,JBR-5510 windows-all,linux-all
|
||||
java/awt/Mixing/AWT_Mixing/JSpinnerInGlassPaneOverlapping.java 8158801,JBR-5510 windows-all,linux-all
|
||||
java/awt/Mixing/AWT_Mixing/JSpinnerOverlapping.java 8158801,JBR-5510 windows-all,linux-all
|
||||
java/awt/Mixing/AWT_Mixing/JTableInGlassPaneOverlapping.java 8158801,JBR-5510 windows-all,linux-all
|
||||
java/awt/Mixing/AWT_Mixing/JTableOverlapping.java 8158801,JBR-5510 windows-all,linux-all
|
||||
java/awt/Mixing/AWT_Mixing/JTextAreaInGlassPaneOverlapping.java 8158801,JBR-5510 windows-all,linux-all
|
||||
java/awt/Mixing/AWT_Mixing/JTextAreaOverlapping.java 8158801,JBR-5510 windows-all,linux-all
|
||||
java/awt/Mixing/AWT_Mixing/JTextFieldInGlassPaneOverlapping.java 8158801,JBR-5510 windows-all,linux-all
|
||||
java/awt/Mixing/AWT_Mixing/JTextFieldOverlapping.java 8158801,JBR-5510 windows-all,linux-all
|
||||
java/awt/Mixing/AWT_Mixing/JToggleButtonInGlassPaneOverlapping.java 8158801,JBR-5510 windows-all,linux-all
|
||||
java/awt/Mixing/AWT_Mixing/JToggleButtonOverlapping.java 8158801,JBR-5510 windows-all,linux-all
|
||||
java/awt/Mixing/AWT_Mixing/ViewportOverlapping.java 8158801,JBR-5510 windows-all,linux-all
|
||||
java/awt/Modal/BlockedMouseInputTest.java NOBUG linux-all
|
||||
java/awt/Modal/ModalDialogOrderingTest/ModalDialogOrderingTest.java 8066259,8253184,JBR-5510 macosx-all,windows-all,linux-all
|
||||
java/awt/Modal/MultipleDialogs/MultipleDialogs4Test.java 8198665,8253184,JBR-5510 macosx-all,windows-all,linux-all
|
||||
java/awt/Paint/PaintNativeOnUpdate.java 8253184,JBR-5510 windows-all,linux-all
|
||||
java/awt/PopupMenu/PopupMenuStayOpen.java NOBUG linux-all
|
||||
java/awt/Robot/HiDPIScreenCapture/HiDPIRobotScreenCaptureTest.java 8253184,NOBUG windows-all,linux-all
|
||||
java/awt/Robot/HiDPIScreenCapture/ScreenCaptureGtkTest.java NOBUG linux-all
|
||||
java/awt/Window/8159168/SetShapeTest.java 8253184,JBR-5510 windows-all,linux-all
|
||||
java/awt/Window/BackgroundIsNotUpdated/BackgroundIsNotUpdated.java JBR-5359,JBR-5510 windows-aarch64,linux-all
|
||||
java/awt/Window/MultiWindowApp/ChildAlwaysOnTopTest.java JBR-5510,JBR-5359 linux-all,windows-aarch64
|
||||
java/awt/Window/MultiWindowApp/MultiWindowAppTest.java 8253184,JBR-5510 windows-all,linux-all
|
||||
java/awt/Window/ShapedAndTranslucentWindows/SetShape.java 8253184,JBR-5510 windows-all,linux-all
|
||||
java/awt/Window/TranslucentJAppletTest/TranslucentJAppletTest.java JBR-5359,JBR-5510 windows-aarch64,linux-all
|
||||
java/awt/Window/WindowTitleVisibleTest/WindowTitleVisibleTestLinuxGnome.java NOBUG linux-all
|
||||
javax/swing/JButton/8151303/PressedIconTest.java JBR-5210,JBR-5510 windows-all,linux-all
|
||||
javax/swing/JComponent/7154030/bug7154030.java JBR-5359,JBR-5510 windows-aarch64,linux-all
|
||||
javax/swing/JDialog/Transparency/TransparencyTest.java 8253184,JBR-5510 windows-all,linux-all
|
||||
javax/swing/JEditorPane/8195095/ImageViewTest.java 8253184,JBR-5510 windows-all,linux-all
|
||||
javax/swing/JEditorPane/TestBrowserBGColor.java JBR-5359,JBR-5510 windows-aarch64,linux-all
|
||||
javax/swing/JFormattedTextField/TestSelectedTextBackgroundColor.java JBR-5510,JBR-6160 linux-all
|
||||
javax/swing/JFrame/8175301/ScaledFrameBackgroundTest.java JBR-5359,JBR-5510 windows-aarch64,linux-all
|
||||
javax/swing/JInternalFrame/5066752/bug5066752.java 8253184,JBR-5510 windows-all,linux-all
|
||||
javax/swing/JInternalFrame/8160248/JInternalFrameDraggingTest.java JBR-5359,JBR-5510 windows-aarch64,linux-all
|
||||
javax/swing/JMenu/JMenuSelectedColorTest.java JBR-5510 linux-all
|
||||
javax/swing/JMenu/TestDisabledMenuForegroundColor.java JBR-5510 linux-all
|
||||
javax/swing/JPasswordField/TestSelectedTextBackgroundColor.java JBR-5510 linux-all
|
||||
javax/swing/JProgressBar/TestJProgressBarHighlightColor.java JBR-5510 linux-all
|
||||
javax/swing/JRadioButton/8041561/bug8041561.java JBR-5359,JBR-5510 windows-aarch64,linux-all
|
||||
javax/swing/JSlider/TestJSliderRendering.java JBR-5510 linux-all
|
||||
javax/swing/JSpinner/4670051/DateFieldUnderCursorTest.java JBR-5510 linux-all
|
||||
javax/swing/JSpinner/TestSelectedTextBackgroundColor.java JBR-5510 linux-all
|
||||
javax/swing/JSplitPane/4820080/JSplitPaneDragColorTest.java JBR-5359,JBR-5510 windows-aarch64,linux-all
|
||||
javax/swing/JSplitPane/4885629/bug4885629.java 8019935,JBR-5359,JBR-5510 macosx-all,windows-aarch64,linux-all
|
||||
javax/swing/JTextPane/TestJTextPaneBackgroundColor.java JBR-5510 linux-all
|
||||
javax/swing/JToolTip/TestTooltipBackgroundColor.java JBR-5510 linux-all
|
||||
javax/swing/JTree/TestTreeBackgroundColor.java JBR-5510 linux-all
|
||||
javax/swing/JWindow/ShapedAndTranslucentWindows/PerPixelTranslucentCanvas.java 8253184,JBR-5510 windows-all,linux-all
|
||||
javax/swing/JWindow/ShapedAndTranslucentWindows/PerPixelTranslucentSwing.java 8194128,8253184,JBR-5510 macosx-all,windows-all,linux-all
|
||||
javax/swing/plaf/basic/BasicHTML/4251579/bug4251579.java 8253184,JBR-5510 windows-all,linux-all
|
||||
javax/swing/plaf/nimbus/8041642/bug8041642.java 8253184,JBR-5510 windows-all,linux-all
|
||||
javax/swing/plaf/nimbus/8041642/ScrollBarThumbVisibleTest.java JBR-5359,JBR-5510 windows-aarch64,linux-all
|
||||
javax/swing/plaf/nimbus/8057791/bug8057791.java 8253184,JBR-5510 windows-all,linux-all
|
||||
javax/swing/plaf/nimbus/TestNimbusBGColor.java JBR-5359,NOBUG windows-aarch64,linux-all
|
||||
javax/swing/text/html/CSS/4530474/bug4530474.java JBR-5359,JBR-5510,JBR-5951 windows-aarch64,linux-all,windows-x64
|
||||
sanity/client/SwingSet/src/ButtonDemoScreenshotTest.java 8265770,8273312,JBR-5510 windows-all,macosx-all,linux-all
|
||||
sanity/client/SwingSet/src/EditorPaneDemoTest.java JBR-5359,JBR-5510 windows-aarch64,linux-all
|
||||
sun/java2d/GdiRendering/ClipShapeRendering.java JBR-5359,JBR-5366,JBR-5510 windows-all,linux-all
|
||||
sun/java2d/GdiRendering/InsetClipping.java 7124403,JBR-5359,JBR-5366,JBR-5510 windows-all,macosx-all,windows-aarch64,linux-all
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
###########################################################################
|
||||
#
|
||||
# Copyright (c) 2023, JetBrains s.r.o.
|
||||
# Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -117,7 +117,6 @@ java/awt/Button/DisabledButtonPress.java JBR-5799 windows-aarch64
|
||||
java/awt/Desktop/8064934/bug8064934.java JBR-5764 windows-all
|
||||
java/awt/Debug/DumpOnKey/DumpOnKey.java JBR-5225,JBR-5359 windows-all,windows-aarch64
|
||||
java/awt/event/MouseEvent/MouseClickTest/MouseClickTest.java 8168389 windows-all,macosx-all
|
||||
java/awt/event/KeyEvent/CorrectTime/CorrectTime.java 6626492 linux-all
|
||||
java/awt/event/KeyEvent/SwallowKeyEvents/SwallowKeyEvents.java 8224055 macosx-all
|
||||
java/awt/Focus/FocusOwnerFrameOnClick/FocusOwnerFrameOnClick.java 8081489 generic-all
|
||||
java/awt/Focus/FocusSubRequestTest/FocusSubRequestTest.java JBR-5178 windows-all
|
||||
@@ -164,7 +163,7 @@ java/awt/EventQueue/6980209/bug6980209.java 8198615 macosx-all
|
||||
java/awt/Frame/ExceptionOnSetExtendedStateTest/ExceptionOnSetExtendedStateTest.java 8198237 macosx-all
|
||||
java/awt/Frame/SetMinimumSizeTest/SetMinimumSizeTest2.java JBR-5210 windows-all
|
||||
java/awt/Frame/ShapeNotSetSometimes/ShapeNotSetSometimes.java JBR-5210 windows-all,linux-5.18.2-arch1-1
|
||||
java/awt/grab/EmbeddedFrameTest1/EmbeddedFrameTest1.java 7080150,JBR-4880,8253184,JBR-5510 macosx-all,windows-all,linux-5.18.2-arch1-1
|
||||
java/awt/grab/EmbeddedFrameTest1/EmbeddedFrameTest1.java 7080150,JBR-4880,8253184 macosx-all,windows-all
|
||||
java/awt/grab/GrabOnUnfocusableToplevel/GrabOnUnfocusableToplevel.java 8169109,JBR-4880 linux-all,windows-all
|
||||
java/awt/event/InputEvent/EventWhenTest/EventWhenTest.java 8168646 generic-all
|
||||
java/awt/Mixing/AWT_Mixing/HierarchyBoundsListenerMixingTest.java 8049405,8253184 generic-all
|
||||
@@ -216,7 +215,6 @@ java/awt/Focus/ActualFocusedWindowTest/ActualFocusedWindowRetaining.java 6829264
|
||||
java/awt/Focus/ShowFrameCheckForegroundTest/ShowFrameCheckForegroundTest.java JBR-5210 windows-all
|
||||
java/awt/datatransfer/DragImage/MultiResolutionDragImageTest.java 8080982 generic-all
|
||||
java/awt/datatransfer/SystemFlavorMap/AddFlavorTest.java 8079268 linux-all
|
||||
java/awt/datatransfer/SystemSelection/SystemSelectionSwingTest.java JBR-6393 linux-5.18.2-arch1-1
|
||||
java/awt/datatransfer/UnicodeTransferTest/UnicodeTransferTest.java 8300704 linux-all
|
||||
java/awt/Toolkit/ScreenInsetsTest/ScreenInsetsTest.java JBR-5812 linux-all
|
||||
java/awt/Toolkit/SecurityTest/SecurityTest2.java JBR-5225,JBR-5359 windows-all,windows-aarch64
|
||||
@@ -228,7 +226,7 @@ java/awt/EventDispatchThread/LoopRobustness/LoopRobustness.java 8073636,JBR-4211
|
||||
java/awt/EventDispatchThread/PropertyPermissionOnEDT/PropertyPermissionOnEDT.java JBR-5225,JBR-5359 windows-all,windows-aarch64
|
||||
java/awt/FullScreen/AltTabCrashTest/AltTabCrashTest.java JBR-4905 windows-all,linux-all
|
||||
java/awt/FullScreen/FullScreenInsets/FullScreenInsets.java 7019055,8266245 windows-all,linux-all,macosx-aarch64
|
||||
java/awt/FullScreen/FullscreenWindowProps/FullscreenWindowProps.java JBR-4275,JBR-4880,JBR-5837 linux-all,windows-all,macosx-all
|
||||
java/awt/FullScreen/FullscreenWindowProps/FullscreenWindowProps.java JBR-4275 linux-all
|
||||
java/awt/FullScreen/NoResizeEventOnDMChangeTest/NoResizeEventOnDMChangeTest.java 7188711,8253184 linux-all,windows-all
|
||||
java/awt/FullScreen/UninitializedDisplayModeChangeTest/UninitializedDisplayModeChangeTest.java 7188711,8273617,JBR-4880,8253184 macosx-all,linux-all,windows-all
|
||||
java/awt/Focus/8013611/JDK8013611.java 8175366 windows-all,macosx-all
|
||||
@@ -267,7 +265,7 @@ java/awt/TrayIcon/TrayIconEventModifiers/TrayIconEventModifiersTest.java 8150540
|
||||
java/awt/TrayIcon/TrayIconEvents/TrayIconEventsTest.java 8150540,8295300 windows-all,linux-all
|
||||
java/awt/TrayIcon/TrayIconMouseTest/TrayIconMouseTest.java 8150540 windows-all
|
||||
java/awt/TrayIcon/TrayIconPopup/TrayIconPopupClickTest.java 8150540 windows-all,macosx-all
|
||||
java/awt/TrayIcon/TrayIconPopup/TrayIconPopupTest.java 8150540,JBR-3107 windows-all,linux-all
|
||||
java/awt/TrayIcon/TrayIconPopup/TrayIconPopupTest.java 8150540 windows-all
|
||||
|
||||
java/awt/Window/8027025/Test8027025.java 8253184 windows-all
|
||||
java/awt/Window/8159168/SetShapeTest.java 8253184,JBR-5510 windows-all,linux-5.18.2-arch1-1
|
||||
@@ -339,7 +337,7 @@ java/awt/Choice/ChoiceHandleMouseEvent_2.java JBR-5359 windows-aarch64
|
||||
java/awt/Choice/ChoiceMouseWheelTest/ChoiceMouseWheelTest.java 6849371,7100044,JBR-5210 macosx-all,linux-all,windows-all
|
||||
java/awt/Component/F10TopToplevel/F10TopToplevel.java JBR-5687 linux-all
|
||||
java/awt/Component/GetScreenLocTest/GetScreenLocTest.java 4753654 generic-all
|
||||
java/awt/Component/RepaintTest.java JBR-5359,JBR-5510 windows-aarch64,linux-5.18.2-arch1-1
|
||||
java/awt/Component/RepaintTest.java JBR-5359 windows-aarch64
|
||||
java/awt/Component/SetComponentsBounds/SetComponentsBounds.java JBR-4275 linux-all
|
||||
java/awt/Component/SetEnabledPerformance/SetEnabledPerformance.java 8165863 macosx-all
|
||||
java/awt/Clipboard/HTMLTransferTest/HTMLTransferTest.java 8017454 macosx-all
|
||||
@@ -492,13 +490,13 @@ java/awt/Modal/ModalFocusTransferTests/FocusTransferWDFModeless3Test.java 825318
|
||||
java/awt/Modal/ModalFocusTransferTests/FocusTransferWDFNonModal1Test.java 8253184 windows-all
|
||||
java/awt/Modal/ModalFocusTransferTests/FocusTransferWDFNonModal2Test.java 8253184 windows-all
|
||||
java/awt/Modal/ModalFocusTransferTests/FocusTransferWDFNonModal3Test.java 8253184 windows-all
|
||||
java/awt/Modal/ModalInternalFrameTest/ModalInternalFrameTest.java 8253184,JBR-6302 windows-all,linux-all
|
||||
java/awt/Modal/ModalInternalFrameTest/ModalInternalFrameTest.java 8253184 windows-all
|
||||
java/awt/Modal/MultipleDialogs/MultipleDialogs1Test.java 8198665,8253184 macosx-all,windows-all
|
||||
java/awt/Modal/MultipleDialogs/MultipleDialogs2Test.java 8198665,8253184 macosx-all,windows-all
|
||||
java/awt/Modal/MultipleDialogs/MultipleDialogs3Test.java 8198665,8253184 macosx-all,windows-all
|
||||
java/awt/Modal/MultipleDialogs/MultipleDialogs4Test.java 8198665,8253184,JBR-5510 macosx-all,windows-all,linux-5.18.2-arch1-1
|
||||
java/awt/Modal/MultipleDialogs/MultipleDialogs5Test.java 8198665,8253184 macosx-all,windows-all
|
||||
java/awt/Mouse/EnterExitEvents/DragWindowOutOfFrameTest.java 8177326,8253184,JBR-6305 macosx-all,windows-all,linux-x64
|
||||
java/awt/Mouse/EnterExitEvents/DragWindowOutOfFrameTest.java 8177326,8253184 macosx-all,windows-all
|
||||
java/awt/Mouse/EnterExitEvents/DragWindowTest.java 8253184 windows-all
|
||||
java/awt/Mouse/EnterExitEvents/ModalDialogEnterExitEventsTest.java 8253184,JBR-5811 windows-all,linux-all
|
||||
java/awt/Mouse/EnterExitEvents/ResizingFrameTest.java 8005021,8253184 macosx-all,windows-all
|
||||
@@ -607,7 +605,7 @@ java/awt/List/ActionEventTest/ActionEventTest.java JBR-5799 windows-x64
|
||||
java/awt/List/EmptyListEventTest/EmptyListEventTest.java JBR-5387 linux-all
|
||||
java/awt/List/FirstItemRemoveTest/FirstItemRemoveTest.java JBR-86 windows-x64
|
||||
java/awt/List/ItemEventTest/ItemEventTest.java JBR-5711 linux-all
|
||||
java/awt/List/KeyEventsTest/KeyEventsTest.java JBR-5210,JBR-6273 windows-all,linux-aarch64
|
||||
java/awt/List/KeyEventsTest/KeyEventsTest.java JBR-5210 windows-all
|
||||
java/awt/List/ListMultipleSelectTest/ListMultipleSelectTest.java JBR-5555 windows-all
|
||||
java/awt/List/NofocusListDblClickTest/NofocusListDblClickTest.java 8253184 windows-all
|
||||
javax/print/PrintSEUmlauts/PrintSEUmlauts.java 8135174 generic-all
|
||||
@@ -910,9 +908,8 @@ javax/swing/JLabel/7004134/bug7004134.java JBR-5437 linux-all
|
||||
javax/swing/JMenu/4213634/bug4213634.java 8197552 windows-all
|
||||
javax/swing/JMenu/4515762/bug4515762.java 8197552 windows-all
|
||||
javax/swing/JMenu/4692443/bug4692443.java JBR-6093 windows-x64
|
||||
javax/swing/JMenu/6470128/bug6470128.java 8253184,JBR-6307 windows-all,linux-all
|
||||
javax/swing/JMenu/6538132/bug6538132.java JBR-894 windows-all
|
||||
javax/swing/JMenu/8072900/WrongSelectionOnMouseOver.java JBR-6306 linux-all
|
||||
javax/swing/JMenu/6470128/bug6470128.java 8253184 windows-all
|
||||
javax/swing/JMenu/6538132/bug6538132.java JBR-894 windows-all00
|
||||
javax/swing/JMenu/PopupReferenceMemoryLeak.java JBR-5890,JBR-6056 windows-aarch64,windows-x64
|
||||
javax/swing/JMenuBar/4750590/bug4750590.java JBR-6094 windows-x64
|
||||
javax/swing/JMenuItem/4171437/bug4171437.java JBR-6112 windows-x64
|
||||
@@ -1019,7 +1016,7 @@ javax/swing/plaf/synth/Test8043627.java JBR-5767 windows-all
|
||||
javax/swing/JInternalFrame/5066752/bug5066752.java 8253184,JBR-5510 windows-all,linux-5.18.2-arch1-1
|
||||
javax/swing/JInternalFrame/8160248/JInternalFrameDraggingTest.java JBR-5359,JBR-5510 windows-aarch64,linux-5.18.2-arch1-1
|
||||
javax/swing/JInternalFrame/8020708/bug8020708.java JBR-4879 windows-all
|
||||
javax/swing/JInternalFrame/8069348/bug8069348.java 8253184,JBR-900 windows-all,linux-all
|
||||
javax/swing/JInternalFrame/8069348/bug8069348.java 8253184,JBR-900 macosx-aarch64,windows-all
|
||||
javax/swing/ToolTipManager/Test6256140.java 8197552 windows-all
|
||||
javax/swing/text/DefaultEditorKit/4278839/bug4278839.java CODETOOLS-7901623 windows-all
|
||||
javax/swing/text/GlyphPainter2/6427244/bug6427244.java JBR-896 windows-all
|
||||
@@ -1037,7 +1034,7 @@ java/awt/Robot/ModifierRobotKey/ModifierRobotKeyTest.java JBR-5802 windows-all
|
||||
java/awt/ColorClass/AlphaColorTest.java JBR-5359,JBR-5510 windows-aarch64,linux-5.18.2-arch1-1
|
||||
|
||||
sanity/client/SwingSet/src/ButtonDemoScreenshotTest.java 8265770,8273312,JBR-5510 windows-all,macosx-all,linux-5.18.2-arch1-1
|
||||
sanity/client/SwingSet/src/ColorChooserDemoTest.java 8278582,8273312,JBR-5510 windows-all,linux-5.18.2-arch1-1
|
||||
sanity/client/SwingSet/src/ColorChooserDemoTest.java 8278582,8273312 windows-all
|
||||
sanity/client/SwingSet/src/DialogDemoTest.java 8253184 windows-all
|
||||
sanity/client/SwingSet/src/FrameDemoTest.java 8253184 windows-all
|
||||
sanity/client/SwingSet/src/InternalFrameDemoTest.java 8253184 windows-all
|
||||
@@ -1046,7 +1043,7 @@ sanity/client/SwingSet/src/TextFieldDemoTest.java JBR-5061 linux-all Ubuntu-22.0
|
||||
sanity/client/SwingSet/src/ToolTipDemoTest.java 8293001 linux-all
|
||||
sanity/client/SwingSet/src/SliderDemoTest.java 8253184 windows-all
|
||||
sanity/client/SwingSet/src/SpinnerDemoTest.java 8253184 windows-all
|
||||
sanity/client/SwingSet/src/SplitPaneDemoTest.java JBR-5817 linux-all
|
||||
sanity/client/SwingSet/src/SplitPaneDemoTest.java JBR-5817 linux-5.19.0-1025-aws
|
||||
sanity/client/SwingSet/src/SwingSet2DemoTest.java 8253184 windows-all
|
||||
|
||||
############################################################################
|
||||
@@ -1188,7 +1185,6 @@ java/awt/TextArea/TextAreaTwicePack/TextAreaTwicePack.java 8253184 windows-all
|
||||
java/awt/TextField/OverScrollTest/OverScrollTest.java 8253184 windows-all
|
||||
java/awt/event/MouseEvent/SpuriousExitEnter/SpuriousExitEnter.java 8254841 macosx-all
|
||||
java/awt/Focus/AppletInitialFocusTest/AppletInitialFocusTest1.java 8256289,JBR-5359 windows-x64,windows-aarch64
|
||||
java/awt/Focus/RequestFocusByCause/RequestFocusByCauseTest.java JBR-6335 linux-all
|
||||
java/awt/Focus/RemoveAfterRequest/RemoveAfterRequest.java JBR-6052 macosx-all,linux-all
|
||||
java/awt/Focus/RowToleranceTransitivityTest.java JBR-5751 windows-all
|
||||
java/awt/FullScreen/TranslucentWindow/TranslucentWindow.java 8258103,8253184 linux-all,windows-all
|
||||
@@ -1210,6 +1206,7 @@ javax/swing/JComboBox/8057893/bug8057893.java
|
||||
|
||||
javax/swing/JList/4618767/JListSelectedElementTest.java JBR-4955 windows-all
|
||||
javax/swing/JList/6462008/bug6462008.java nobug windows-all
|
||||
javax/swing/JMenu/6470128/bug6470128.java nobug windows-all
|
||||
javax/swing/JComboBox/8057893/bug8057893.java nobug windows-all
|
||||
|
||||
# no printer found
|
||||
@@ -1246,7 +1243,6 @@ java/awt/event/MouseEvent/AltGraphModifierTest/AltGraphModifierTest.java
|
||||
jb/java/awt/Graphics2D/TextRender/OGLMetalTextRender.java JBR-5392 windows-aarch64
|
||||
jb/java/awt/event/TouchScreenEvent/TouchScreenEventsTestLinux.sh JBR-4078 linux-all
|
||||
jb/java/awt/event/MouseEvent/ReleaseAndClickModifiers.java JBR-5366 windows-all
|
||||
jb/java/awt/Font/font430.sh JBR-4956 linux-all
|
||||
jb/java/awt/Font/Font467.java JBR-3960 generic-all
|
||||
jb/java/awt/keyboard/AltGrMustGenerateAltGrModifierTest4207.java JBR-4207 windows-all
|
||||
jb/java/awt/Toolkit/AWTThreadingTest.java JBR-4350 macosx-all
|
||||
@@ -1267,6 +1263,7 @@ java/awt/event/KeyEvent/DeadKey/DeadKeySystemAssertionDialog.java JBR-4880,JBR-5
|
||||
java/awt/event/KeyEvent/KeyCharTest/KeyCharTest.java JBR-4880 windows-all
|
||||
java/awt/Frame/LayoutOnMaximizeTest/LayoutOnMaximizeTest.java JBR-4880 windows-all
|
||||
java/awt/Frame/MiscUndecorated/UndecoratedInitiallyIconified.java JBR-4880 windows-all
|
||||
java/awt/FullScreen/FullscreenWindowProps/FullscreenWindowProps.java JBR-4275,JBR-4880 linux-all,windows-all
|
||||
java/awt/FullScreen/SetFSWindow/FSFrame.java 8253184 windows-all
|
||||
java/awt/grab/MenuDragEvents/MenuDragEvents.java JBR-4880 windows-all
|
||||
java/awt/image/mlib/MlibOpsTest.java JBR-5225,JBR-5359 windows-all,windows-aarch64
|
||||
@@ -1416,26 +1413,3 @@ java/awt/Toolkit/LockingKeyStateTest/LockingKeyStateTest.java JBR-5765 macosx-al
|
||||
jb/sun/awt/macos/InputMethodTest/FocusMoveUncommitedCharactersTest.java JBR-5765 macosx-all
|
||||
|
||||
jb/java/awt/Focus/FocusTraversalOrderTest.java JBR-6060 generic-all
|
||||
jb/java/awt/Focus/TitleBarClickTest.java JBR-6394 linux-5.18.2-arch1-1,windows-all
|
||||
|
||||
com/sun/java/swing/plaf/gtk/TestFileChooserSingleDirectorySelection.java JBR-5510 linux-5.18.2-arch1-1
|
||||
java/awt/Choice/ChoiceGeneratesItemEvents.java JBR-5510 linux-5.18.2-arch1-1
|
||||
java/awt/Choice/ChoiceStaysOpenedOnTAB.java JBR-5510 linux-5.18.2-arch1-1
|
||||
java/awt/Graphics/XORPaint.java#id2 JBR-5510 linux-5.18.2-arch1-1
|
||||
java/awt/Robot/HiDPIScreenCapture/HiDPIRobotScreenCaptureTest.java JBR-5510 linux-5.18.2-arch1-1
|
||||
java/awt/Robot/HiDPIScreenCapture/ScreenCaptureGtkTest.java JBR-5510 linux-5.18.2-arch1-1
|
||||
java/awt/Robot/HiDPIScreenCapture/ScreenCaptureTest.java JBR-5510 linux-5.18.2-arch1-1
|
||||
java/awt/Robot/NonEmptyErrorStream.java JBR-5510 linux-5.18.2-arch1-1
|
||||
java/awt/Toolkit/DesktopProperties/rfe4758438.java JBR-5510 linux-5.18.2-arch1-1
|
||||
javax/swing/JComboBox/6406264/bug6406264.java JBR-5510 linux-5.18.2-arch1-1
|
||||
javax/swing/JComboBox/TestComboBoxComponentRendering.java JBR-5510 linux-5.18.2-arch1-1
|
||||
javax/swing/JMenu/TestDisabledMenuForegroundColor.java JBR-5510 linux-5.18.2-arch1-1
|
||||
javax/swing/JPasswordField/TestSelectedTextBackgroundColor.java JBR-5510 linux-5.18.2-arch1-1
|
||||
javax/swing/JProgressBar/TestJProgressBarHighlightColor.java JBR-5510 linux-5.18.2-arch1-1
|
||||
javax/swing/JSlider/TestJSliderRendering.java JBR-5510 linux-5.18.2-arch1-1
|
||||
javax/swing/JSpinner/TestSelectedTextBackgroundColor.java JBR-5510 linux-5.18.2-arch1-1
|
||||
javax/swing/JTextPane/TestJTextPaneBackgroundColor.java JBR-5510 linux-5.18.2-arch1-1
|
||||
javax/swing/JToolTip/TestTooltipBackgroundColor.java JBR-5510 linux-5.18.2-arch1-1
|
||||
javax/swing/JTree/TestTreeBackgroundColor.java JBR-5510 linux-5.18.2-arch1-1
|
||||
javax/swing/plaf/nimbus/TestNimbusBGColor.java JBR-5510 linux-5.18.2-arch1-1
|
||||
sun/java2d/ClassCastExceptionForInvalidSurface.java JBR-5510 linux-5.18.2-arch1-1
|
||||
|
||||
@@ -2,11 +2,8 @@ java/awt/Dialog/DialogLocationTest.java JBR-6090 windows-all
|
||||
java/awt/datatransfer/DragUnicodeBetweenJVMTest/DragUnicodeBetweenJVMTest.java JBR-5538 windows-all
|
||||
java/awt/datatransfer/MissedHtmlAndRtfBug/MissedHtmlAndRtfBug.java JBR-6027 windows-all
|
||||
java/awt/dnd/MissedDragEnterTest.java JBR-6091 windows-all
|
||||
java/awt/event/KeyEvent/ExtendedModifiersTest/ExtendedModifiersTest.java JBR-6292 windows-all
|
||||
java/awt/event/KeyEvent/KeyMaskTest/KeyMaskTest.java JBR-6292 windows-all
|
||||
java/awt/event/MouseEvent/AcceptExtraButton/AcceptExtraButton.java JBR-6353 linux-x64,windows-aarch64,macosx-all
|
||||
java/awt/event/MouseEvent/FrameMouseEventAbsoluteCoordsTest/FrameMouseEventAbsoluteCoordsTest.java 8238720,JBR-6095 windows-all,linux-all
|
||||
java/awt/event/StressTest/MouseAndKeyEventStressTest.java JBR-6090 windows-all
|
||||
java/awt/event/MouseEvent/FrameMouseEventAbsoluteCoordsTest/FrameMouseEventAbsoluteCoordsTest.java 8238720,JBR-6095 windows-all,linux-all
|
||||
java/awt/Focus/6378278/InputVerifierTest.java JBR-6090 windows-all
|
||||
java/awt/Focus/6382144/EndlessLoopTest.java JBR-6090 windows-all
|
||||
java/awt/Focus/8282640/ScrollPaneFocusBugTest.java JBR-6090 windows-all
|
||||
@@ -16,7 +13,6 @@ java/awt/Focus/ModalExcludedWindowClickTest/ModalExcludedWindowClickTest.java JB
|
||||
java/awt/Focus/MouseClickRequestFocusRaceTest/MouseClickRequestFocusRaceTest.java 8194753,JBR-6090 linux-all,macosx-all,windows-x64
|
||||
java/awt/Focus/SimpleWindowActivationTest/SimpleWindowActivationTest.java JBR-6089 windows-all
|
||||
java/awt/Focus/WindowUpdateFocusabilityTest/WindowUpdateFocusabilityTest.java JBR-6090 windows-all
|
||||
java/awt/Frame/GetGraphicsStressTest/GetGraphicsStressTest.java JBR-6233 windows-x64
|
||||
java/awt/Frame/InvisibleOwner/InvisibleOwner.java JBR-6090 windows-all
|
||||
java/awt/Frame/MaximizedToOppositeScreen/MaximizedToOppositeScreenSmall.java JBR-6090 windows-all
|
||||
java/awt/Frame/RestoreToOppositeScreen/RestoreToOppositeScreen.java 8286840 linux-all
|
||||
@@ -36,41 +32,11 @@ java/awt/PopupMenu/PopupMenuLocation.java
|
||||
javax/swing/JComboBox/TestComboBoxComponentRendering.java JBR-6100 linux-all
|
||||
javax/swing/JComponent/7154030/bug7154030.java JBR-6134 windows-x64
|
||||
javax/swing/JPopupMenu/6580930/bug6580930.java JBR-5071 linux-all
|
||||
javax/swing/JWindow/ShapedAndTranslucentWindows/ShapedPerPixelTranslucentGradient.java 8233582,JBR-6090 linux-all,windows-all
|
||||
javax/swing/JWindow/ShapedAndTranslucentWindows/ShapedPerPixelTranslucentGradient.java JBR-6090 windows-all
|
||||
javax/swing/JWindow/ShapedAndTranslucentWindows/ShapedTranslucentPerPixelTranslucentGradient.java JBR-6090 windows-all
|
||||
|
||||
sanity/client/SwingSet/src/EditorPaneDemoTest.java JBR-5359,JBR-5510,JBR-6285 windows-aarch64,linux-all
|
||||
sanity/client/SwingSet/src/ToolTipDemoTest.java 8293001,JBR-6293 linux-all,windows-all
|
||||
sun/java2d/GdiRendering/ClipShapeRendering.java JBR-5204 linux-all,windows-all
|
||||
|
||||
#
|
||||
# the below tests are not intended to be executed in S2 configurations because
|
||||
# the tests contains tags to be launched for various scales including S2
|
||||
#
|
||||
jb/java/awt/CustomTitleBar/ActionListenerTest.java nobug generic-all
|
||||
jb/java/awt/CustomTitleBar/ChangeTitleBarHeightTest.java nobug generic-all
|
||||
jb/java/awt/CustomTitleBar/CheckFullScreen.java nobug generic-all
|
||||
jb/java/awt/CustomTitleBar/CreateTitleBarTest.java nobug generic-all
|
||||
jb/java/awt/CustomTitleBar/DialogNativeControlsTest.java nobug generic-all
|
||||
jb/java/awt/CustomTitleBar/FrameNativeControlsMacOSTest.java nobug generic-all
|
||||
jb/java/awt/CustomTitleBar/FrameNativeControlsTest.java nobug generic-all
|
||||
jb/java/awt/CustomTitleBar/HiddenNativeControlsTest.java nobug generic-all
|
||||
jb/java/awt/CustomTitleBar/HitTestClientArea.java nobug generic-all
|
||||
jb/java/awt/CustomTitleBar/HitTestNonClientArea.java nobug generic-all
|
||||
jb/java/awt/CustomTitleBar/JDialogNativeControlsTest.java nobug generic-all
|
||||
jb/java/awt/CustomTitleBar/MaximizedWindowFocusTest.java nobug generic-all
|
||||
jb/java/awt/CustomTitleBar/MaximizeWindowTest.java nobug generic-all
|
||||
jb/java/awt/CustomTitleBar/MinimizingWindowTest.java nobug generic-all
|
||||
jb/java/awt/CustomTitleBar/MouseEventsOnClientArea.java nobug generic-all
|
||||
jb/java/awt/CustomTitleBar/NativeControlsVisibilityTest.java nobug generic-all
|
||||
jb/java/awt/CustomTitleBar/WindowResizeTest.java nobug generic-all
|
||||
jb/java/awt/CustomTitleBar/WindowsControlWidthTest.java nobug generic-all
|
||||
jb/java/awt/CustomTitleBar/WindowVisibilityTest.java nobug generic-all
|
||||
|
||||
java/awt/event/ComponentEvent/TextComponentTextEventTest.java JBR-6287 windows-all
|
||||
|
||||
jb/java/awt/Focus/ModalDialogOverSiblingTest.java JBR-5716 windows-all
|
||||
jb/java/awt/Focus/PopupIncomingFocusTest.java JBR-2651 generic-all
|
||||
jb/java/awt/Focus/RequestFocusInParent.java JBR-5715 windows-all
|
||||
jb/java/awt/Focus/SecondLevelPopupTest.java JBR-6090 windows-all
|
||||
java/awt/Window/WindowSizeDifferentScreens/WindowSizeDifferentScreens.java JBR-5513 linux-all
|
||||
|
||||
Reference in New Issue
Block a user