Giter Club home page Giter Club logo

fire's People

Contributors

actions-user avatar acyco avatar fossabot avatar qwertyyb avatar shikisuen avatar yingguqing avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

fire's Issues

问个关于输入法 IMK 组字区行为的问题。

image

这样看起来像是 IMK 组字区内有一个空格。 请问这样设计是为了确保「某些按键会被输入法捕捉到」吗?还是有别的考量?

P.S.: 可以考虑开启 Discussion 版面,这样就不用开工单来讨论了。

m1 pro 找不到SQLCipher依赖

Screenshot 2023-04-18 at 15 44 03

我更新了一下,还是找不到

❯ pod update
Update all pods
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Installing SQLCipher 4.5.3 (was 4.5.1)
Installing SwiftLint 0.51.0 (was 0.47.1)
Generating Pods project
Integrating client project
Pod installation complete! There are 7 dependencies from the Podfile and 7 total pods installed.

[!] The `Fire [Debug]` target overrides the `PODS_CONFIGURATION_BUILD_DIR` build setting defined in `Pods/Target Support Files/Pods-Fire/Pods-Fire.debug.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

报告一个bug

在中文状态下,如果想不切换,也不用符号(;)临时切换,
直接输入英文: aBcD+回车(注意大小写)
最终会变成:BDac
这里应该有逻辑问题,当有字符没上屏时,shift+[a-z] 不能让大写先上屏


又碰到一个.
默认设置shift切换中英文
在微信中输入时, 微信中是用shift+回车 换行
然后会随机性的,很频繁的出现中文来回切换

Notorization: altool has been deprecated

当我运行scripts/c_notorize_installer.sh时,发现altool将在明年被停用,migrate到新的notarytool应该比较简单。See Apple's doc

Warning: altool has been deprecated and, starting in fall 2023, will no longer be supported by the Apple notary service. You should start using notarytool to notarize your software.

checkModifierKeyUp 或需要新增 keyCode 检查。

private func checkModifierKeyUp (event: NSEvent) -> Bool {
if event.type == .flagsChanged
&& event.modifierFlags.intersection(.deviceIndependentFlagsMask) == .init(rawValue: 0)
&& Date() - lastTime <= delayInterval {
// modifier keyup event
lastTime = Date(timeInterval: -3600*4, since: Date())
return true
}
return false
}

这个函式正文最开头插入这一行:

guard checkKeyCode.contains(Int(event.keyCode)) else { return false }

不然的话,这个模组在某些情况下会把 CapsLock+字符键 给判断成 Shift 单击事件。

加入手动调整候选顺序的功能

这个项目真的很好,生成的程序干净,体积小,出字速度快。感谢作者的付出!

有一个小问题, 比如我输入 e, 候选的有 "月, 有, .."
有应当是高频词,优先排在月前面,希望这里可以优化一下,加入手动调整候选顺序的功能

关于中文和英文/数字间插入空格的问题

目前已发现的问题

  1. 输入英文后按删除键删除英文,再输入中文,仍然会在前面插入空格,比较影响使用,初步方案为按删除键后,不再执行自动插入空格的逻辑,按删除键后清空lastInputText变量
  2. 输入数字后再输入中文,不会自动插入空格

Vertical模式下pageIndicatorColor没有关联hasPrev和hasNext

Image("arrowUp")
.renderingMode(.template)
.resizable()
.frame(width: 10, height: 10, alignment: .center)
.rotationEffect(Angle(degrees: -90), anchor: .center)
.onTapGesture {
if !hasPrev { return }
NotificationCenter.default.post(
name: Fire.prevPageBtnTapped,
object: nil
)
}
Image("arrowDown")
.renderingMode(.template)
.resizable()
.frame(width: 10, height: 10, alignment: .center)
.rotationEffect(Angle(degrees: -90), anchor: .center)
.onTapGesture {
if !hasNext { return }
print("next")
NotificationCenter.default.post(
name: Fire.nextPageBtnTapped,
object: nil
)

建议extract出来一个function给vertical和horizontal共用,这样就可以避免新功能out of sync的问题。这是一种写法:

var _indicator: some View {
        let arrowUp = getIndicatorIcon(imageName: "arrowUp", direction: direction, activeFlag: hasPrev, eventName: State.prevPageBtnTapped)
        let arrowDown = getIndicatorIcon(imageName: "arrowDown", direction: direction, activeFlag: hasNext, eventName: State.nextPageBtnTapped)
        if direction == CandidatesDirection.horizontal {
            return AnyView(VStack(spacing: 0) { arrowUp; arrowDown })
        } else {
            return AnyView(HStack(spacing: 4) { arrowUp; arrowDown })
        }
    }
    
    func getIndicatorIcon(imageName: String, direction: CandidatesDirection, activeFlag: Bool, eventName: Notification.Name) -> some View {
        return Image(imageName)
            .renderingMode(.template)
            .resizable()
            .frame(width: 10, height: 10, alignment: .center)
            .rotationEffect(Angle(degrees: direction == CandidatesDirection.horizontal ? 0 : -90), anchor: .center)
            .onTapGesture {
                if !activeFlag { return }
                NotificationCenter.default.post(
                    name: eventName,
                    object: nil
                )
            }
            .foregroundColor(Color(activeFlag
                                   ? themeConfig[colorScheme].pageIndicatorColor
                                   : themeConfig[colorScheme].pageIndicatorDisabledColor
                                  ))
    }

提个小需求

希望可以在中英文和数字之间自动添加空格

保留应用最后使用状态有点问题

我在微信里是中文输入,我设置了xcode为英文输入。我从微信切到xcode能正常变成英文输入。但是我切回微信时,一样是英文输入。

标点符号的问题

Fire是我用过的最好用的五笔输入法,非常感谢!有一个小问题,中文标点符号的双引号只能输半个,而不是成对出现,以前用过的输入法是这样设计的,按一次先上屏左半个,再按一次则上屏右半个。英文标点貌似左右半个都是一样的,可能不存在这样的问题。

swift里面的小笔误:Punctuation漏了个a

最近想做一个mac的输入法,你的代码对我帮助非常大🙏。在学习代码的时候进行了一次全局搜索punctuation,结果没有找到任何使用的地方。仔细一看发现Punctuation好像都漏了个a,这种小笔误我也经常犯。

IMKInputController.handle() 函式的 event 参数位置可能会被系统喂屎,需要做 guard-let 处理。

在这个函式最开头插入这句即可:

guard let event = event else { return }
圖片 常见的被系统喂屎的情形包括但不限于「在字元检视器当中点击输入某些文字符号」: 圖片

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               Fire [34680]
Path:                  /Library/Input Methods/Fire.app/Contents/MacOS/Fire
Identifier:            com.qwertyyb.inputmethod.Fire
Version:               v0.16.0 (20230506052003)
Code Type:             X86-64 (Native)
Parent Process:        launchd [1]
User ID:               502

Date/Time:             2023-05-29 20:06:41.3789 +0800
OS Version:            macOS 13.4 (22F66)
Report Version:        12
Bridge OS Version:     7.5 (20P5058)
Anonymous UUID:        08378DA6-1F38-296F-EE86-338AA00FC385

Sleep/Wake UUID:       1F6DE16D-2E2F-4637-8E75-E0F39DD20DE8

Time Awake Since Boot: 85000 seconds
Time Since Wake:       3258 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes:       0x0000000000000001, 0x0000000000000000

Termination Reason:    Namespace SIGNAL, Code 4 Illegal instruction: 4
Terminating Process:   exc handler [34680]

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   Fire                          	       0x10e504c02 0x10e4f8000 + 52226
1   Fire                          	       0x10e505261 0x10e4f8000 + 53857
2   InputMethodKit                	    0x7ff92b37170c -[IMKServer handleEvent_Common:characterIndex:edge:clientWrapper:controller:] + 697
3   InputMethodKit                	    0x7ff92b36686e __63-[IMKServer handleEvent:characterIndex:edge:asyncClient:reply:]_block_invoke_2 + 676
4   ViewBridge                    	    0x7ff822b83a4a +[NSServiceViewController withHostAppAuditToken:invoke:] + 92
5   InputMethodKit                	    0x7ff92b3665be __63-[IMKServer handleEvent:characterIndex:edge:asyncClient:reply:]_block_invoke + 201
6   InputMethodKit                	    0x7ff92b373146 __IMKXPCPerformBlockOnMainThread_block_invoke + 25
7   CoreFoundation                	    0x7ff81adbdb71 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
8   CoreFoundation                	    0x7ff81adbdaaa __CFRunLoopDoBlocks + 398
9   CoreFoundation                	    0x7ff81adbcd7a __CFRunLoopRun + 2015
10  CoreFoundation                	    0x7ff81adbbf31 CFRunLoopRunSpecific + 560
11  HIToolbox                     	    0x7ff824837dad RunCurrentEventLoopInMode + 292
12  HIToolbox                     	    0x7ff824837bbe ReceiveNextEventCommon + 657
13  HIToolbox                     	    0x7ff824837918 _BlockUntilNextEventMatchingListInModeWithFilter + 64
14  AppKit                        	    0x7ff81de505d0 _DPSNextEvent + 858
15  AppKit                        	    0x7ff81de4f47a -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1214
16  AppKit                        	    0x7ff81de41ae8 -[NSApplication run] + 586
17  AppKit                        	    0x7ff81de15d02 NSApplicationMain + 817
18  Fire                          	       0x10e4fb609 0x10e4f8000 + 13833
19  dyld                          	    0x7ff81a98841f start + 1903

支持左右键翻页或转移高亮

目前无论是vertical还是horizontal的page格式,都只能用上下键翻页。Vertical mode的时候会显示page up (<) and page down (>)两个按钮,看起来像左右键,结果按了左右键发现没有用。

Screen Shot 2022-10-24 at 12 23 03 PM

或者比较常见的就是horizontal mode左右键可以转移高亮到下一个candidate,到底了就翻页。vertical mode就是上下键转移高亮。这个是苹果自带拼音输入法的做法。

使用过程中cpu使用率有些高

使用了一下,整体很棒哈。

有个问题,没打几个字,cpu使用率有些高,截图:

截屏2022-11-18 02 16 29

CPU型号:

λ ~/ sysctl machdep.cpu.brand_string
machdep.cpu.brand_string: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
λ ~/

看了清歌输入法的公共模块,应该是用到了前缀树优化过

λ /Library/Input Methods/Qingg.app/Contents/Frameworks/ ll
total 0
drwxrwxrwx  5 xuxihai  staff   160B  8 21  2019 CocoaLumberjack.framework
drwxrwxrwx  5 xuxihai  staff   160B  8 21  2019 MASPreferences.framework
drwxrwxrwx  5 xuxihai  staff   160B  8 21  2019 QinggTrie.framework
drwxrwxrwx  5 xuxihai  staff   160B  8 21  2019 Sparkle.framework
drwxrwxrwx  5 xuxihai  staff   160B  8 21  2019 TransitionKit.framework

非常感谢作者,弄下来不用配置,完全符习惯. 提个建议哈.

com.apple.loginwindow
#登录窗口

com.apple.SecurityAgent
#权限验证

com.apple.LocalAuthenticationRemoteService
#系统设置->密码

com.apple.Touch-ID-Settings.extension
#更改密码

能把这两个包默认英文吗
一个是用户登录窗口
一个是管理员权限验证窗口

百度/搜狗/清风 这几个都用过,这个问题都存在
经常会在密码输入窗口出现'中文输入'
也是因为这原因才另外找输入法

我不知道别人有没有这个问题,
也有可能因为我把系统自带的ABC给删了造成的 -_-!

因为不熟悉xcode, 依赖库的问题折腾了半天才跑起来,
然后才发现系统日志中能看到 -_-!

这两个包名都不知道是什么应用,估计要找配置文件改了.
建议作者在软件内置加上这两个配置,
我估计是强迫症研究了一下午 -_-!

提个建议

输入法从系统输入法切换回业火时,能不能显示一下当前的中/英状态

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.