1. Tải bản cài đặt AutoIT mới nhất

    Chào Khách. Nếu bạn mới tham gia và chưa cài đặt AutoIT.
    Vui lòng vào topic trên để tải bản AutoIT mới nhất nhé
    Dismiss Notice
  2. Quy định và nội quy

    Chào Khách. Vui lòng đọc kỹ nội quy và quy định của diễn đàn
    Để tránh bị ban một cách đáng tiếc nhé!
    Dismiss Notice
  3. Hướng dẫn chèn mã AutoIT trong diễn đàn

    Chào Khách. Vui lòng xem qua bài viết này
    Để biết cách chèn mã AutoIT trong diễn đàn bạn nhé :)
    Dismiss Notice

AutoHotKey Đánh máy bằng 1 tay

Thảo luận trong 'AutoHotkey' bắt đầu bởi vinh19291, 16/11/22.

  1. vinh19291

    vinh19291 Thành viên mới
    • 1/6

    Tham gia ngày:
    16/11/22
    Bài viết:
    1
    Đã được thích:
    0
    Mình có tìm trên mạng được 1 đoạn code chuyển bàn phím về 1 phía rất thuận lợi cho việc đánh máy 1 tay https://www.autohotkey.com/board/topic/1257-half-qwerty-one-handed-typing/ Tuy nhiên do mình viết tiếng việt nên sử dụng cái chữ cái YUIO rất nhiều dẫn đến việc phải gõ phím space nhiều nên mình đã sửa lại code như bên dưới để có thể chuyển các phím từ 1->6 thành các phím POIUY. Mặc dù chuyển qua được nhưng khi đánh các chữ như: gaí, caí, maĩ...vị trí dấu lại không đúng, trong khi nếu dùng code nguyên bản thì không mắc vấn đề này, xin mọi người giúp đỡ./.
    Mã (Text):

    #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
    ; #Warn  ; Enable warnings to assist with detecting common errors.
    SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
    SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
    ; Many thanks to Chris for helping me out with this script.
    mirror_1 =
    mirror_2 =
    mirror_3 =
    mirror_4 =
    mirror_5 =
    mirror_q = p
    mirror_w = o
    mirror_e = i
    mirror_r = u
    mirror_t = y
    mirror_a = `;
    mirror_s = l
    mirror_d = k
    mirror_f = j
    mirror_g = h
    mirror_z = /
    mirror_x = .
    mirror_c = ,
    mirror_v = m
    mirror_b = n
    mirror_6 = 5
    mirror_7 = 4
    mirror_8 = 3
    mirror_9 = 2
    mirror_0 = 1
    mirror_y = t
    mirror_u = r
    mirror_i = e
    mirror_o = w
    mirror_p = q
    mirror_h = g
    mirror_j = f
    mirror_k = d
    mirror_l = s
    mirror_n = b
    mirror_m = v
    return
    1::Send, p
    2::Send, o
    ;2 & 2::Send, ô
    3::Send, i
    4::Send, u
    5::Send, y
    ; This key may help, as the space-on-up may get annoying, especially if you type fast.
    Control & Space::Suspend
    ; These keys are optional, but they may help if you are typing on the left-hand side.
    CapsLock::Send, {BackSpace}
    Space & CapsLock::Send, {Enter}
    ; If spacebar didn't modify anything, send a real space keystroke upon release.
    space::
    Send {space}
    return
    space & 1::
    space & 2::
    space & 3::
    space & 4::
    space & 5::
    space & q::
    space & w::
    space & e::
    space & r::
    space & t::
    space & a::
    space & s::
    space & d::
    space & f::
    space & g::
    space & z::
    space & x::
    space & c::
    space & v::
    space & b::
    space & `;::
    space & ,::
    space & .::
    space & /::
    space & 6::
    space & 7::
    space & 8::
    space & 9::
    space & 0::
    space & y::
    space & u::
    space & i::
    space & o::
    space & p::
    space & h::
    space & j::
    space & k::
    space & l::
    space & n::
    space & m::
    ; Determine the mirror key, if there is one:
    if A_ThisHotkey = space & `;
       MirrorKey = a
    else if A_ThisHotkey = space & ,
       MirrorKey = c
    else if A_ThisHotkey = space & .
       MirrorKey = x
    else if A_ThisHotkey = space & /
       MirrorKey = z
    else  ; To avoid runtime errors due to invalid var names, do this part last.
    {
       StringRight, ThisKey, A_ThisHotkey, 1
       StringTrimRight, MirrorKey, mirror_%ThisKey%, 0  ; Retrieve "array" element.
       if MirrorKey =  ; No mirror, script probably needs adjustment.
          return
    }
    Modifiers =
    GetKeyState, state1, LWin
    GetKeyState, state2, RWin
    state = %state1%%state2%
    if state <> UU  ; At least one Windows key is down.
       Modifiers = %Modifiers%#
    GetKeyState, state1, Control
    if state1 = D
       Modifiers = %Modifiers%^
    GetKeyState, state1, Alt
    if state1 = D
       Modifiers = %Modifiers%!
    GetKeyState, state1, Shift
    if state1 = D
       Modifiers = %Modifiers%+
    Send %Modifiers%{%MirrorKey%}
    return
     
     

Chia sẻ trang này

Đang tải...