Forum > Linux

ddebian 12 input err!

<< < (5/5)

d99net:

--- Quote from: korba812 on May 01, 2024, 02:53:37 pm ---Take a look at this, it may be helpful:
https://wiki.freepascal.org/Lazarus_FAQ#Typing_in_edit_fields_generate_duplicate_letters
https://forum.lazarus.freepascal.org/index.php/topic,39213.msg268286.html#msg268286

--- End quote ---

export GTK_IM_MODULE=gtk-im-context-simple
export QT_IM_MODULE=simple
export XMODIFIERS=@im=none

It's normal, thank you

d99net:
//----------------------------------------------------------------
//   gtk2callback.inc
//----------------------------------------------------------------

threadvar
  g_KeyPress_count: integer;
  g_KeyPress_keyval: integer; // Event^.keyval
  g_KeyPress_time: guint32; // Event^.time

function GTKKeyPress(Widget: PGtkWidget; Event: pgdkeventkey;
  Data: gPointer): GBoolean; cdecl;
begin
  if (g_KeyPress_time = Event^.time) and (g_KeyPress_keyval = Event^.keyval) then
  begin
    Inc(g_KeyPress_count);
    if g_KeyPress_count > 3 then
    begin
      Result := True;
      exit;
    end;
  end
  else
  begin
    g_KeyPress_count := 0;
    g_KeyPress_keyval := Event^.keyval;
    g_KeyPress_time := Event^.time;
  end;

  Result := HandleGtkKeyUpDown(Widget, Event, Data, True, True, 'key-press-event');
end;   


---------------------------------------------------------------------------------------------------------------


ubuntu,deepin,lubuntu,OpenSuse,debian12   test ok!

(Only tested in English char)

TRon:
Thank you @korba812
next step in my process was asking about input method configuration  :) )

Navigation

[0] Message Index

[*] Previous page

Go to full version