Skip to content

Commit

Permalink
Add newline and tab as whitespace (#701)
Browse files Browse the repository at this point in the history
Rename is_trigger_char() to is_whitespace() for clarity

Does not fix my other observation; 2nd whitespace char turns autocap back off
  • Loading branch information
Spike-from-NH authored Aug 28, 2024
1 parent 701030d commit 893bb84
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions srcs/juloo.keyboard2/Autocapitalisation.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,17 +142,19 @@ void callback_now(boolean might_disable)
void type_one_char(char c)
{
_cursor++;
if (is_trigger_character(c))
if (is_whitespace(c))
_should_update_caps_mode = true;
else
_should_enable_shift = false;
}

boolean is_trigger_character(char c)
boolean is_whitespace(char c)
{
switch (c)
{
case ' ':
case KEYCODE_ENTER:
case KEYCODE_TAB:
return true;
default:
return false;
Expand Down

0 comments on commit 893bb84

Please sign in to comment.