Option for hide mouse on keypress event
This commit is contained in:
parent
6e9b41314e
commit
0e0aba7a5e
@ -449,6 +449,8 @@ o('mouse_hide_wait', 3.0, option_type=positive_float, long_text=_('''
|
||||
Hide mouse cursor after the specified number of seconds
|
||||
of the mouse not being used. Set to zero to disable mouse cursor hiding.'''))
|
||||
|
||||
o('mouse_hide_key', True, long_text=_('''TODO'''))
|
||||
|
||||
o('focus_follows_mouse', False, long_text=_('''
|
||||
Set the active window to the window under the mouse when
|
||||
moving the mouse around'''))
|
||||
|
||||
@ -180,6 +180,7 @@ on_key_input(int key, int scancode, int action, int mods, const char* text, int
|
||||
bool ok_to_send = action == GLFW_PRESS || action == GLFW_REPEAT || screen->modes.mEXTENDED_KEYBOARD;
|
||||
if (ok_to_send) {
|
||||
if (has_text) {
|
||||
if (OPT(mouse_hide_key)) hide_mouse(global_state.callback_os_window);
|
||||
schedule_write_to_child(w->id, 1, text, strlen(text));
|
||||
debug("sent text to child\n");
|
||||
} else {
|
||||
|
||||
@ -382,6 +382,7 @@ PYWRAP1(set_options) {
|
||||
S(url_style, PyLong_AsUnsignedLong);
|
||||
S(tab_bar_edge, PyLong_AsLong);
|
||||
S(mouse_hide_wait, PyFloat_AsDouble);
|
||||
S(mouse_hide_key, PyObject_IsTrue);
|
||||
S(wheel_scroll_multiplier, PyFloat_AsDouble);
|
||||
S(touch_scroll_multiplier, PyFloat_AsDouble);
|
||||
S(open_url_modifiers, convert_mods);
|
||||
|
||||
@ -14,7 +14,7 @@ typedef enum { LEFT_EDGE, TOP_EDGE, RIGHT_EDGE, BOTTOM_EDGE } Edge;
|
||||
|
||||
typedef struct {
|
||||
double visual_bell_duration, cursor_blink_interval, cursor_stop_blinking_after, mouse_hide_wait, click_interval, wheel_scroll_multiplier, touch_scroll_multiplier;
|
||||
bool enable_audio_bell;
|
||||
bool mouse_hide_key, enable_audio_bell;
|
||||
CursorShape cursor_shape;
|
||||
unsigned int open_url_modifiers;
|
||||
unsigned int rectangle_select_modifiers;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user